Search code examples
androiddialogstatusbar

Status bar is going to hide when a dialogbox pops


I have an activity with a listview, and onClick of items, I have to show a dialog box with full screen theme ( android.R.style.Theme_Black_NoTitleBar_Fullscreen) on Dialog box is visible the activity's statusbar Visibility gone. I have theme of android:theme="@style/AppTheme.NoActionBar" in manifest for that activity.

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

    </style>

Please help me.


Solution

  • I have add CoordinatorLayout View to the root tag with and fixed the issue.

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