I'm interested in having a uniform color toolbar and status bar. If I provide colorPrimary and colorPrimaryDark as the same color, this should be possible. I get the desired result with the ActionBar, but not with the toolbar. I also create a navigation view, so I need the status bar to be transparent.

Code: Styles-v21
<style name="AppTheme.NoActionBar"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> <item name="android:windowDrawsSystemBarBackgrounds">true</item> <item name="android:statusBarColor">@android:color/transparent</item> </style>
Code: Styles
<resources> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimary</item> <item name="colorAccent">@color/colorAccent</item> </style> <style name="AppTheme.NoActionBar"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> </style> <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/> <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/> </resources>
Steps to play:
- Create a new project in Android Studio using
Navigation Drawer Activity - Set
primary and primaryDark as the same colors - Run on a device or emulator
source share