In Honeycomb, the Books Action Bar fades in/out when the user taps on the screen, appearing/disappearing over other layout content.
How is this d开发者_高级运维one?
Set this as your application or activity theme:
<style name="Theme.OverlayActionBar" parent="android:Theme.Holo.Light">
<item name="windowActionBarOverlay">true</item>
</style>
Then you can use ActionBar.hide()
and show()
as in Berdons answer.
You can add/hide ActionBars programmatically with (Source):
ActionBar actionBar = getActionBar();
actionBar.hide();
actionBar.show();
Edit:
You might even be able to go so far as to pull the ActionBar view from the parent and re-add it so it "floats" (RelativeLayout as the container).
Edit 3:
Hmm... How about using a negative top margin on your activity layout and then using show/hide?
精彩评论