【发布时间】:2013-01-11 15:33:49
【问题描述】:
我有一个隐藏 Actionbar 的活动,当我单击按钮时,我希望它可见,但我不希望布局活动向下滚动,该栏必须与其重叠。 我怎么能做这样的事情?
隐藏我使用的栏
actionbar.hide();
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
并使其可见:
actionbar.show();
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
我的布局只是
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<MyPager
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<MyPager>
</RelativeLayout>
提前致谢。
【问题讨论】:
-
粘贴一些代码或布局,根据这个描述很难说。
标签: android android-activity android-actionbar