[android-developers] Re: replacing a fragments not working

2011-03-24 Thread jotobjects
All the examples of replace() have one Fragment inside one FrameLayout. This arrangement of one Container ViewGroup per Fragment seems to be necessary for dynamically replacing Fragments. On Mar 24, 4:32 pm, jotobjects wrote: > We did switch to using FrameLayout for other reasons (have not tried

[android-developers] Re: replacing a fragments not working

2011-03-24 Thread jotobjects
We did switch to using FrameLayout for other reasons (have not tried replace() with that yet). LinearLayout works if you want to add and remove the last View in the LinearLayout. FragmentTransaction.replace() is used in samples in these files - - FragmentsStack.java - Fragments.Layout.java - Frag

Re: [android-developers] Re: replacing a fragments not working

2011-03-24 Thread Dianne Hackborn
Many of the API demos use this -- for example the stack and layout demos. You can look at those and see what you are doing differently. On Thu, Mar 24, 2011 at 10:37 AM, jotobjects wrote: > I can remove and add fragments, but replace doesn't cause the new > Fragment to show up. > > The API docs

[android-developers] Re: replacing a fragments not working

2011-03-24 Thread jotobjects
I can remove and add fragments, but replace doesn't cause the new Fragment to show up. The API docs are a little unclear about which existing Fragment would be replaced. On Mar 23, 4:49 pm, jotobjects wrote: > Having a bit of a go with Fragments and hitting a snag.  My layout > looks like this.