On Tue, Apr 19, 2011 at 11:10 AM, Dave Johnston <john...@gmail.com> wrote: > I'm having trouble implementing ActionBar tabs whilst also using > backward-compatible Fragments (with the compatibility package). > > The main issue being that ActionBar.TabListener expects > android.app.Fragment, and my Fragment classes inherit from > android.support.v4.app.Fragment. Therefore I can't use my Fragments > with the ActionBar on 3.0-and-later devices. > > Anyone have any ideas how I can solve or work around this? (besides > just not using tabs)
ActionBar.TabListener does not expect android.app.Fragment. It does, however, supply an android.app.FragmentTransaction as a parameter, rather than the Android Compatibility Library implementation of FragmentTransaction. What seems to be working for me is to simply ignore the passed-in FragmentTransaction and use your own. See the FeedsTabActivity in this project: https://github.com/commonsguy/cw-advandroid/tree/master/Honeycomb/FeedFragments -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en