GeeCON Prague 2014*
The moose likes Android and the fly likes Dynamically replacing Fragments Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Mobile » Android
Bookmark "Dynamically replacing Fragments" Watch "Dynamically replacing Fragments" New topic
Author

Dynamically replacing Fragments

Stephen Tret
Greenhorn

Joined: Feb 03, 2011
Posts: 17
I am trying to replace fragment1 with fragment3 by clicking on a 'Change Fragment' Button defined in fragmen2. Fragment3 will not fully replace Fragment1 completely. Instead it lines itself up underneath the text in Fragment1. I am doing something silly and I could use some pointers. I have included the code here and the output error screenshot (the gray area fragment3 doesn't completely overlay the white area fragment1). Thanks for any pointers.

Code for main.xml:


Code for fragment1:


Code for fragment3:


Code for fragment2:


Java Code behind 'Change Fragment' in fragment2:



[Thumbnail for screenshot.jpg]

 
GeeCON Prague 2014
 
subject: Dynamically replacing Fragments