diff options
author | Florian <64581222+fm-sys@users.noreply.github.com> | 2020-12-11 22:36:16 +0300 |
---|---|---|
committer | Niedermann IT-Dienstleistungen <stefan-niedermann@users.noreply.github.com> | 2020-12-12 18:34:04 +0300 |
commit | 3cab6716c9e005a4bba42dfbd342e6e1c764af27 (patch) | |
tree | bfd05df7721198ac87725f7f03bac81c7d421351 /app/src/main/res | |
parent | 7802386a28c58da31aeebed318315e5856f94f59 (diff) |
Dark mode following system default (fix #392)
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/values/setup.xml | 10 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 8 | ||||
-rw-r--r-- | app/src/main/res/xml/settings.xml | 7 |
3 files changed, 21 insertions, 4 deletions
diff --git a/app/src/main/res/values/setup.xml b/app/src/main/res/values/setup.xml index c790a5868..ac4e7d73d 100644 --- a/app/src/main/res/values/setup.xml +++ b/app/src/main/res/values/setup.xml @@ -30,6 +30,16 @@ <item>@string/pref_value_background_6_hours</item> </string-array> + <string name="pref_value_theme_light" translatable="false">LIGHT</string> + <string name="pref_value_theme_dark" translatable="false">DARK</string> + <string name="pref_value_theme_system_default" translatable="false">SYSTEM_DEFAULT</string> + + <string-array name="darkMode_values"> + <item>@string/pref_value_theme_light</item> + <item>@string/pref_value_theme_dark</item> + <item>@string/pref_value_theme_system_default</item> + </string-array> + <!-- To be concatenated with the account id --> <string name="shared_preference_last_account" translatable="false">it.niedermann.nextcloud.deck.last_account</string> <string name="shared_preference_last_board_for_account_" translatable="false">it.niedermann.nextcloud.deck.last_board_for_account_</string> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8c29e67cd..2b347e3f1 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -148,13 +148,17 @@ <string name="your_deck_version_is_too_old">Your deck version is too old</string> <string name="deck_outdated_please_update">Your deck version is too old (%1$s). Please update to use this android app as client.</string> <string name="delete_board_message">This will permanently delete this board including all lists and cards.</string> - <string name="settings_theme_title">Dark theme</string> + <string name="settings_theme_title">Theme</string> <string name="settings_branding_title">Branding</string> <string name="settings_compact_title">Compact mode</string> <string name="settings_background_sync">Background synchronization</string> <string name="pref_value_wifi_and_mobile">Sync on Wi-Fi and mobile data</string> <string name="pref_value_wifi_only">Sync only on Wi-Fi</string> - <string name="pref_value_theme_light">Light</string> + <string-array name="darkmode_entries"> + <item>Light</item> + <item>Dark</item> + <item>System Default</item> + </string-array> <string name="unassigned_user">Unassigned %1$s</string> <string name="no_activities">There are no activities on this card. You need to be connected to the internet to load and display activities.</string> <string name="share_board">Share board</string> diff --git a/app/src/main/res/xml/settings.xml b/app/src/main/res/xml/settings.xml index 6d67622bd..1471e98ce 100644 --- a/app/src/main/res/xml/settings.xml +++ b/app/src/main/res/xml/settings.xml @@ -19,10 +19,13 @@ </it.niedermann.nextcloud.deck.ui.branding.BrandedPreferenceCategory> <it.niedermann.nextcloud.deck.ui.branding.BrandedPreferenceCategory android:title="@string/simple_appearance"> - <it.niedermann.nextcloud.deck.ui.branding.BrandedSwitchPreference - android:defaultValue="@string/pref_value_theme_light" + <ListPreference + android:defaultValue="@string/pref_value_theme_system_default" + android:entries="@array/darkmode_entries" + android:entryValues="@array/darkMode_values" android:icon="@drawable/ic_brightness_2_grey600_24dp" android:key="@string/pref_key_dark_theme" + android:summary="%s" android:title="@string/settings_theme_title" /> <it.niedermann.nextcloud.deck.ui.branding.BrandedSwitchPreference |