I have three actions in my application. The MainActivity array is a DrawerLayout with fitsSystemWindows="true" . The root element of the other two actions is the CoordinatorLayout with the same properties. I defined android:launchMode="singleTop" for all actions in the manifest.
All actions use the same AppTheme theme, which has the following attributes:
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="android:navigationBarColor">@color/colorPrimaryDark</item> <item name="android:windowDrawsSystemBarBackgrounds">true</item> <item name="android:statusBarColor">@android:color/transparent</item> <item name="android:windowTranslucentStatus">true</item> <item name="android:windowBackground">@color/background</item> <item name="android:colorBackground">@color/background</item> </style>
This works for MainActivity, but not for the other two, where the status bar is black (instead of transparent, as it should be). This does not apply to the previous version (v7: 27.0.2) of the support library. Can anyone understand what could be wrong here? Thanks in advance!
source share