I'm now wondering if Fragments are the right way to go. According to the design I have, every tab has different fragments, none of which can be reused.
I would also like this app to work on earlier versions. I'm aware that Fragments are backward compatible till v4. I'm also aware that there are extensions for the ActionBar for pre-3.0 versions. My question is: Does it make sense to go with Fragments considering my design? Thanks in advance... On Jun 29, 7:21 am, Mark Murphy <[email protected]> wrote: > On Tue, Jun 28, 2011 at 3:03 PM, Yip <[email protected]> wrote: > > I'm developing a tablet app on 3.1. Is it possible to implement a > > design in such a way that each ActionBar Tab has differentFragments? > > Sure. Just have the TabListeners set up the appropriatefragmentsvia > FragmentTransactions. > > > For example, I have 4 ActionBar tabs. My first tab has 3fragments, > > the second one has 2fragmentsand the remaining tabs have 1 fragment > > each. > > Ah. This may be more challenging. You will need to set up a layout > that has three FrameLayout "slots" for thefragments, making some of > those FrameLayouts have visibility of GONE or something, depending on > the selected tab. Again, the TabListener would be responsible for > setting this up. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android Training in Oslo:http://bit.ly/fjBo24 -- 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

