I'm using Material theme. I want my app to be only in light theme (For now we don't have any plans for dark mode). Some devices force dark mode on apps and I want to avoid that.
I have seen this post on SO and unfortunately it doesn’t work for me.
So, how to solve this?
Styles.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="materialButtonStyle">@style/ButtonTheme</item>
</style>
<style name="LandingTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/White</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:buttonStyle">@style/ButtonTheme</item>
</style>
</resoures>