On Sat, Sep 8, 2012 at 8:15 PM, pharaoh <[email protected]> wrote: > I am developing a application and in a activity a I want it to be similar to > ICS settings application, i.e. in the left side I have a ListFragment with > 4 categories and in the right a Fragment with content of each category, and > each category has a different layout, and I ran into a doubt: should a > develop 4 different fragments for the categories and replace them according > to the selected category or there is a way to just use one Fragment for the > content and use different layouts according to selected category.
If they are going to have different layouts, I would recommend having different fragments, one per layout. If, on the other hand, they will all have the same layout, but the *content* is different -- you need to populate widgets, not replace them -- then having a single fragment should be fine. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.1 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

