弹出对话框时状态栏将隐藏
Status bar is going to hide when a dialogbox pops
我有一个带有 listview
和 onClick
项目的 activity,我必须在对话框上显示一个全屏主题的对话框 ( android.R.style.Theme_Black_NoTitleBar_Fullscreen)
可见 activity 的状态栏可见性消失了。我在 activity 的清单中有 android:theme="@style/AppTheme.NoActionBar"
的主题。
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">true</item>
<item name="windowNoTitle">true</item>
</style>
请帮帮我。
试试这个,对我有用
将此添加到您的 AndroidManifest.xml 中相应的 activity
android:windowSoftInputMode="adjustPan"
然后 activity 添加到父主布局
android:fitsSystemWindows="true"
我已将 CoordinatorLayout View 添加到根标签并解决了这个问题。
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
</android.support.design.widget.CoordinatorLayout>
我有一个带有 listview
和 onClick
项目的 activity,我必须在对话框上显示一个全屏主题的对话框 ( android.R.style.Theme_Black_NoTitleBar_Fullscreen)
可见 activity 的状态栏可见性消失了。我在 activity 的清单中有 android:theme="@style/AppTheme.NoActionBar"
的主题。
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">true</item>
<item name="windowNoTitle">true</item>
</style>
请帮帮我。
试试这个,对我有用
将此添加到您的 AndroidManifest.xml 中相应的 activity
android:windowSoftInputMode="adjustPan"
然后 activity 添加到父主布局
android:fitsSystemWindows="true"
我已将 CoordinatorLayout View 添加到根标签并解决了这个问题。
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
</android.support.design.widget.CoordinatorLayout>