5

Is it possible to have the App Compat ActionBar split when targeting API 21?

Right now I have had all activities include

 android:uiOptions="splitActionBarWhenNarrow"

and have meta-data:

 <meta-data android:name="android.support.UI_OPTIONS"
            android:value="splitActionBarWhenNarrow" />

And my theme Base is Theme.AppCompat

but for some reason this has absolutely no effect making the action bar split.

kandroidj
  • 13,784
  • 5
  • 64
  • 76

1 Answers1

7

There is no split action bar support for Material themes or AppCompat v21. You can certainly create your own bottom action bar via a Toolbar added to your layout, but you have to manage combining the controls on >600dp configurations yourself.

ianhanniballake
  • 191,609
  • 30
  • 470
  • 443
  • OKay, just wanted to make sure of this. I guess this is what I will have to do. Thanks – kandroidj Nov 20 '14 at 18:47
  • May be it is better to use the ActionMenuView. It is the same widget used by the Toolbar to show the actions. – Gabriele Mariotti Nov 20 '14 at 22:28
  • 1
    @GabrieleMariotti - yep! You could certainly use an `ActionMenuView`. one thing that `Toolbar` gives you in addition is support for setting a theme via XML using `app:theme` and `app:popupTheme`. – ianhanniballake Nov 20 '14 at 23:00