I was trying to set dark background in theme like this -
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:colorBackground">@color/background_material_dark</item>
<item name="android:textColorPrimary">@color/abc_primary_text_material_dark</item>
</style>
It is working on Android Lollipop, Marshmallow and Nougat, but on KitKat and older systems, the background is white. Could someone help me? (I want to keep ActionBar too)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.