0

I'm using ActionBarSherlock for actionbars. I want the main Activity to include both Actionbar on top and SplitActionBar on the bottom. So I add

android:uiOptions= "splitActionBarWhenNarrow"

in manifest file. The problem is that actions are shown now in the splitbar and actionbar is empty. Is this the right way to do it? How could I fix it?

Feras Odeh
  • 9,136
  • 20
  • 77
  • 121

1 Answers1

1

Is this the right way to do it?

Yes, in terms of requesting that there be two portions of the action bar, top and bottom, in narrow configurations.

How could I fix it?

There is nothing to "fix". When you have a split action bar (in narrow configurations), your action bar items go to the split (bottom) bar. The original (top) action bar is used for your icon, title, and navigation options (e.g., drop-down list).

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Is there a way to specify which items will be on the top bar and which ones will be down? – Feras Odeh Jul 14 '13 at 20:04
  • @FerasOdeh: No. Actual "items" (e.g., `` elements in a menu resource) will go on the bottom bar. They will appear in the order they are defined in the XML file, unless you use `android:orderInCategory` to resequence them. But I am not aware of any way to tell the split action bar to have actual action bar items on the top bar -- that's reserved for the title, icon, and navigation. – CommonsWare Jul 14 '13 at 20:19
  • This solved my problem. http://stackoverflow.com/questions/9327720/how-to-place-actionbar-items-in-main-actionbar-and-bottom-bar – Feras Odeh Jul 15 '13 at 04:57