开发者

Action Bar like the Books app

开发者 https://www.devze.com 2023-03-26 04:10 出处:网络
In Honeycomb, the Books Action Bar fades in/out when the user taps on the screen, appearing/disappearing over other layout content.

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消