I am trying to get my options to show up in the Title Bar. I'm using ActionBarSherlock and I can figure out how to remove the title in the title bar, but would like to replace the text with 2 options from my options menu.
I'm using this code, EmpubLite as an example for my application, but I can't figure out how Mark (the commonsware guy) got the icons from his options menu in the title bar. My options show up at the bottom in the action bar and this is taking up unnecessary room on the screen. I've been looking through examples here, but can't seem to find out exactly how to get options in the title bar. I'm hoping Mark (or someone) can explain.
Um, unless that happens automatically by removing the title, I suspect that's not possible.
Well, you see, that's covered in this delightful little book... :-)
More seriously,
android:showAsAction
controls whether items should be in the overflow area (never
), should be in the action bar (ifRoom
), or really really should be in the action bar (always
). That being said,always
is a hint, not a demand, and the OS may still put your action bar items in the overflow on smaller screen sizes.You did not state which of the EmPubLite series you are experimenting with. Early on, the items are all set to
never
:By the end of the series, we have some that ideally go into the action bar:
You have
android:uiOptions="splitActionBarWhenNarrow"
set in your manifest somewhere, then.