Hide Action Bar while showing Split Action Bar - android

How can I hide the top Action Bar but show the Split Action Bar using ActionBarSherlock. I would like to have Tabs at the top instead like this:
The Android developer site states the following to hide the action bar but keep the split action bar:
If you'd like to hide the main action bar at the top, because you're
using the built-in navigation tabs along with the split action bar,
call setDisplayShowHomeEnabled(false) to disable the application icon
in the action bar. In this case, there's now nothing left in the main
action bar, so it disappears and all that’s left are the navigation
tabs at the top and the action items at the bottom, as shown by the
second device in figure 3.
https://developer.android.com/guide/practices/tablets-and-handsets.html#SplitActionBar
In my SherlockFragmentActivity I call the following, however only the app icon and title disappear and the action bar stays like this:
//Hide action bar
getSupportActionBar().setDisplayShowTitleEnabled(false);
getSupportActionBar().setDisplayShowHomeEnabled(false);
Calling getSupportActionBar().hide() hides the action bar but also hides the split action bar.

The tabs only roll up into the top action bar if you are using the Tabs provided by ABS. You're not using ViewPager/ViewPagerIndicator for the tabs by any chance are you? (I have this issue currently)

Related

Android Accessibility: ActionMode actionBar items not read instead underlying action bar items are read

When I select items in my list the contextual action bar appears. This bar has a number of action items that will be applicable to the selected items from the list.
When i turn on TalkBack and navigate to this contextual action bar, the focus appears to be on the contextual action bar but TalkBack actually reads out the items on the original actionBar (i presume this is underneath the contextual action bar).
How can i get talkback to only navigate through the contextual action bar items and never read out the actionBar items when the contextual action bar is visible.
Just get a handle on the underlying toolbar and set it to invisible. Showing and hiding the support actionbar will not work as the content will slide up under the action mode bar.

How can I center a menu item in an action bar?

How can I center a menu item in an action bar? I am using an image icon in action bar as menu but it appears at the right side of the action bar and I want to center it. Is it possible in android ?
This can be done using custom views in actionbar. In native actionbar view you can't set alignment of menu items. Check here another SO post for custom action bar

Contextual actionbar at bottom

In manifest.file under <activity> tag I have a declaration something like this:
UIOptions :splitActionBarWhenNarrow
When I click on any checkbox from UI, then Contextual action bar is getting created . contextual actionbar items are getting loaded at top and white screen is showing at bottom action bar .
I want contextual action bar at bottom instead of white screen space.
please help.

Show action bar after hiding it

I was developing an app for Android 2.3 where the menu sat nicely at the low right together with the back and home buttons.
I've been using
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
to fully utilize the screen area.
Now, i'm adapting it to SDK>10, and here the menu sits at the top right in the action bar.
Using the above code line hides the action bar, which means I can't see the menu any more.
I could hide the action bar of course by using
ActionBar actionBar = getActionBar();
actionBar.hide();
Where should I put my
ActionBar actionBar = getActionBar();
actionBar.show();
if I'd like to show the action bar by touching the edges of the screen, just like how the software buttons show up?
Regards
/M

Android: Hide title bar while displaying split action bar in NarrowMode?

Is there a way to hide the top title bar in actionbarsherlock while keeping the split action bar visible?

Categories

Resources