Show action bar after hiding it - android

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

Related

How to hide a certain activity's action bar while maintaining the navigation bar?

I'm developing an application with a side navigation menu.
In my activities, the action bar of the activity I'm loading overlays the action bar with the side navigation menu. Even though the side menu is there and works fine.
Home page with the side navigation:
Side navigation works when swiping:
I want to hide or remove the activity's action bar while maintaining the side navigation menu.
This is the code from the onCreate() method
FrameLayout contentFrameLayout = (FrameLayout) findViewById(R.id.content_frame);
getLayoutInflater().inflate(R.layout.activity_complaint, contentFrameLayout);
you can do 2 things
you can provide padding to the side navigation menu , so that the side navigation menu will be displayed just below the action bar
another thing you can do is to hide the Action bar when Navigation Drawer icon is clicked
the code to hide Action bar is below
android.support.v7.app.ActionBar AB= getSupportActionBar();
AB.hide();
I found a solution using the answer from this question:
How to Display Navigation Drawer in all activities?
and adding this bit of code to my activity in the Manifest.xml file
android:theme="#style/AppTheme.NoActionBar"

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.

actionbarsherlock on android 4.3 wont hide the bottom action bar properly, it shows blank white space instead

Hi I am using actionbarsherlock and splitActionBarWhenNarrow to to get a bottom action bar with my menu information. I have set windowActionBarOverlay to be true.
In android 4.2 and below calling getSupportActionBar().hide(); will properly hide both the top and bottom action bars. In android 4.3 getSupportActionBar().hide() hides the top action bar properly but it leaves a blank white space where the bottom action bar use to be.
Can anyone help me with this?

Is it possible to display a view in front of the ActionBar?

I have two fragments. One displays my general content (fragment A). The other, fragment B, is displayed over the top of fragment A. I would like for my action bar to have a z-order in the middle of these two layouts. That is, the fragment B would be displayed in front of the action bar.
My question is, is it possible to display a view in front of the action bar?
It is possible.
After all, applications can already display in full screen and not in full screen with the action bar whenever they like. You can set that programmatically yourself in Java.
import android.app.ActionBar;
...
// Show action bar
ActionBar actionBar = getActionBar();
actionBar.show();
...
// Hide action bar
ActionBar actionBar = getActionBar();
actionBar.hide();
Just make sure there is a good reason to alternate this common UI convention on Android.

Hide Action Bar while showing Split Action Bar

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)

Categories

Resources