【问题标题】:Status bar is going to hide when a dialogbox pops弹出对话框时状态栏将隐藏
【发布时间】:2017-03-17 11:33:18
【问题描述】:

我有一个带有listviewonClick 项目的活动,我必须在对话框上显示一个带有全屏主题( android.R.style.Theme_Black_NoTitleBar_Fullscreen) 的对话框,活动的状态栏可见性消失了。我在该活动的清单中有android:theme="@style/AppTheme.NoActionBar" 的主题。

  <style name="AppTheme.NoActionBar">
        <item name="windowActionBar">true</item>
        <item name="windowNoTitle">true</item>

    </style>

请帮帮我。

【问题讨论】:

    标签: android dialog statusbar


    【解决方案1】:

    我已将 CoordinatorLayout 视图添加到根标记并修复了该问题。

     <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>
    

    【讨论】:

      【解决方案2】:

      试试这个,为我工作

      将此添加到您的 AndroidManifest.xml 中的相应活动中

      android:windowSoftInputMode="adjustPan"
      

      并在该活动中添加到父主布局

      android:fitsSystemWindows="true"
      

      【讨论】:

      • 尝试添加adjustResize|adjustPan
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-05-12
      • 2011-04-29
      • 2014-11-29
      相关资源
      最近更新 更多