I created my application before the android pie has been released, in every layout I put android: background = "white" it works fine in every device, but when my brother installed the application and enabled night mode my application becomes a disaster with one single move, everything turns into back and white movie.
android: background = "white"
night mode
<style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/COLOR_PRIMARY</item> <item name="colorPrimaryDark">@color/COLOR_PRIMARY</item> <item name="colorAccent">@color/COLOR_PRIMARY</item> <item name="cardViewStyle">@style/CardView</item> <item name="android:fontFamily">@font/helvetica</item> </style>
my color primary is red.
You can put this, at the first line in the onCreate method of your launcher activity.
onCreate
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
2.1m questions
2.1m answers
60 comments
57.0k users