Added night mode

This commit is contained in:
Sebastian Seedorf
2019-10-21 18:21:46 +02:00
parent c18f4093e4
commit 45704c4f35
39 changed files with 184 additions and 96 deletions

View File

@@ -40,4 +40,15 @@
<item>vegetarian</item>
<item>vegan</item>
</string-array>
<string-array name="pref_night_mode_entries">
<item>Follow system default</item>
<item>Always day mode</item>
<item>Always night mode</item>
</string-array>
<string-array name="pref_night_mode_values" translatable="false">
<item>auto</item>
<item>day</item>
<item>night</item>
</string-array>
</resources>

View File

@@ -5,10 +5,37 @@
<color name="colorFUWhite">#FDFDFD</color>
<color name="colorFUGray">#e0e0e0</color>
<color name="colorFUGrayDark">#cccccc</color>
<color name="colorFUGrayDark2">#444444</color>
<color name="colorFUGrayDark3">#343434</color>
<color name="colorFUBlue">#003366</color>
<color name="colorFUBlack">#333333</color>
<color name="colorFUBlueLight">#587A9E</color>
<color name="colorFUBlack">#222222</color>
<color name="colorFURedLight">#f5cccc</color>
<color name="colorFURedLight2">#cca3a3</color>
<color name="colorFURedDark">#4d2b2b</color>
<color name="colorFURedDark2">#402f2f</color>
<color name="colorFURed">#CC0000</color>
<color name="colorFUOrange">#FF9900</color>
<color name="fuPrimary">@color/colorFUGreen</color>
<color name="fuSecondary">@color/colorFUGreenDark</color>
<color name="fuAccent">@color/colorFUBlue</color>
<color name="fuBackground">@color/colorFUGray</color>
<color name="fuBackgroundShadowed">@color/colorFUGrayDark</color>
<color name="fuBackgroundHighContrast">@color/colorFUWhite</color>
<color name="fuToolbarBackground">@color/colorFUGreen</color>
<color name="fuWeekendPast">@color/colorFURedLight2</color>
<color name="fuWeekendFuture">@color/colorFURedLight</color>
<color name="fuWeekPast">@color/colorFUGray</color>
<color name="fuWeekFuture">@color/colorFUWhite</color>
<color name="fuHeaderText1">@color/colorFUBlack</color>
<color name="fuHeaderText2">@color/colorFUGrayDark3</color>
<color name="fuHeaderText3">@color/colorFUGrayDark3</color>
<color name="fuIcon">@color/colorFUBlack</color>
<color name="fuIconPrimary">@color/colorFUBlack</color>
<color name="fuIconWarn">@color/colorFURed</color>
</resources>

View File

@@ -22,6 +22,13 @@
<string name="pref_food_level" translatable="false">pref_food_level</string>
<string name="pref_food_level_default" translatable="false">all</string>
<string-array name="pref_night_mode" translatable="false">
<item>@string/pref_night_mode</item>
<item>@string/pref_night_mode_default</item>
</string-array>
<string name="pref_night_mode" translatable="false">pref_night_mode</string>
<string name="pref_night_mode_default" translatable="false">auto</string>
<!-- Other preferences -->
<string name="pref_last_visited_news" translatable="false">pref_last_visited_news</string>

View File

@@ -53,9 +53,12 @@
<string name="pref_food_level_title">Meal Filter</string>
<string name="pref_food_level_summary">Only show vegetarian or vegan foods</string>
<string name="pref_food_level_dialog">Meal Filter Selection</string>
<string name="pref_night_mode_title">Night mode</string>
<string name="pref_night_mode_summary">Set usage of night mode</string>
<string name="pref_night_mode_dialog">Night Mode Selection</string>
<string name="pref_sync_frequency_title">Sync frequency</string>
<string name="pref_sync_frequency_summary">Set automatic background sync frequency</string>
<string name="pref_sync_frequency_dialog">Frequency selection</string>
<string name="pref_sync_frequency_dialog">Frequency Selection</string>
<string name="meals">Meals</string>
<string name="special_meals">Special meals</string>
<string name="side_dishes">Side Dishes</string>

View File

@@ -1,28 +1,27 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar" tools:keep="@style/AppTheme">
<style name="FUTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.DayNight.ActionBar" />
>
<style name="FUTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.DayNight" />
<style name="FUTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="colorPrimary">@color/fuPrimary</item>
<item name="colorPrimaryDark">@color/fuSecondary</item>
<item name="colorAccent">@color/fuAccent</item>
<item name="android:windowBackground">@color/fuBackground</item>
</style>
<style name="AppTheme.NoActionBar" tools:keep="@style/AppTheme_NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="FUTheme" parent="Theme.AppCompat.Light.NoActionBar" />
<style name="FUTheme.itemTitle">
<item name="android:textStyle">bold</item>
<item name="android:textSize">12sp</item>
<item name="android:textColor">@android:color/primary_text_light</item>
<item name="android:textColor">@color/fuHeaderText2</item>
</style>
<style name="FUTheme.itemValue">
<item name="android:textSize">12sp</item>
<item name="android:textColor">#343434</item>
<item name="android:textColor">@color/fuHeaderText3</item>
</style>
</resources>