Use DayNight theme from material-components
This commit is contained in:
4
mobile/src/main/res/values-night/bools.xml
Normal file
4
mobile/src/main/res/values-night/bools.xml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<bool name="is_day">false</bool>
|
||||||
|
</resources>
|
||||||
@@ -3,4 +3,6 @@
|
|||||||
<color name="colorPrimary">#2e7d32</color>
|
<color name="colorPrimary">#2e7d32</color>
|
||||||
<color name="colorPrimaryDark">#005005</color>
|
<color name="colorPrimaryDark">#005005</color>
|
||||||
<color name="colorSecondary">#AEEA00</color>
|
<color name="colorSecondary">#AEEA00</color>
|
||||||
|
<!-- This actually takes precedence over v27: https://developer.android.com/guide/topics/resources/providing-resources.html#BestMatch -->
|
||||||
|
<color name="navigationBarColor">@android:color/black</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<style name="Theme.MaterialComponents.DayNight.NoActionBar" parent="Theme.MaterialComponents.NoActionBar"/>
|
|
||||||
</resources>
|
|
||||||
@@ -2,4 +2,5 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<bool name="api_ge_26">false</bool>
|
<bool name="api_ge_26">false</bool>
|
||||||
<bool name="api_lt_25">true</bool>
|
<bool name="api_lt_25">true</bool>
|
||||||
|
<bool name="is_day">true</bool>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<style name="Theme.MaterialComponents.DayNight.NoActionBar" parent="Theme.MaterialComponents.Light.NoActionBar">
|
|
||||||
<item name="android:navigationBarColor">@color/navigationBarColor</item>
|
|
||||||
<item name="android:windowLightNavigationBar" tools:ignore="NewApi">true</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||||
|
<item name="android:navigationBarColor">@color/navigationBarColor</item>
|
||||||
|
<item name="android:windowLightNavigationBar" tools:ignore="NewApi">@bool/is_day</item>
|
||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
<item name="colorSecondary">@color/colorSecondary</item>
|
<item name="colorSecondary">@color/colorSecondary</item>
|
||||||
|
|||||||
Reference in New Issue
Block a user