Google Groups

Re: [android-developers] Using v4 Fragments with v11 ActionBar tabs

Mark Murphy Apr 19, 2011 8:18 AM
Posted in group: Android Developers
On Tue, Apr 19, 2011 at 11:10 AM, Dave Johnston <> 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
>, and my Fragment classes inherit from
> 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 It does,
however, supply an as a parameter,
rather than the Android Compatibility Library implementation of

What seems to be working for me is to simply ignore the passed-in
FragmentTransaction and use your own. See the FeedsTabActivity in this

Mark Murphy (a Commons Guy) | |

Android 3.0 Programming Books: