Statusbar activity black instead of transparent when upgrading to support-v7: 27.1.0

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!

+5
source share
1 answer

I "solved" this by downgrading to support-v27.0.2 . Unfortunately, this is one of those (not very rare) cases where Google changes something and does not document anything.

0
source

Source: https://habr.com/ru/post/1275702/


All Articles