I'm using Theme.AppCompat.DayNight and I want to customize a certain layout background and text color to change depending on whether it's day or night mode .
Here's what I tried so far:
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/primaryDarkColorAmber</item>
<item name="colorPrimaryDark">@color/primaryDarkColorAmber</item>
<item name="colorControlActivated">@color/primaryDarkColorAmber</item>
</style>
<style name="PopUpTheme" parent="AppTheme">
<!-- layout custom theme there's no darkBackground value...!! -->
<item name="android:background">@color/popup_background</item>
</style>
first of all create res/values-night this directory then add same as res/value file you can copy and replace to color and after that when you change day or night theme you can get color according to your style
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With