我有一个活动,其中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>
提前致谢。