mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Added Support for System Wide Dark Theme (#3460)
* Added Support for System Wide Dark Theme * changed methods to private * Moved Strings to strings.xml * Used Dagger to reduce code repetition * Changes made as per review suggestions * Minor Changes * Fixes as per suggestions * Minor Fixes as per suggestion * made the variables static * removed irrelevant code
This commit is contained in:
parent
65ec071493
commit
1584ffe0e2
9 changed files with 139 additions and 42 deletions
|
|
@ -35,4 +35,15 @@
|
|||
<item>@string/exif_tag_software</item>
|
||||
</array>
|
||||
|
||||
<array name="pref_theme_entries">
|
||||
<item>@string/theme_default_name</item>
|
||||
<item>@string/theme_dark_name</item>
|
||||
<item>@string/theme_light_name</item>
|
||||
</array>
|
||||
|
||||
<string-array name="pref_theme_entries_values">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
|
@ -113,8 +113,7 @@
|
|||
<string name="use_previous">Use previous title and description</string>
|
||||
<string name="allow_gps">Automatically get current location</string>
|
||||
<string name="allow_gps_summary">Retrieves current location if image is not geotagged, and geotags image with it. Warning: This will reveal your current location.</string>
|
||||
<string name="preference_theme">Night mode</string>
|
||||
<string name="preference_theme_summary">Use dark theme</string>
|
||||
<string name="preference_theme">Theme</string>
|
||||
<string name="license_name_cc_by_sa_four"> Attribution-ShareAlike 4.0</string>
|
||||
<string name="license_name_cc_by_four"> Attribution 4.0</string>
|
||||
<string name="license_name_cc_by_sa"> Attribution-ShareAlike 3.0</string>
|
||||
|
|
@ -599,4 +598,7 @@ Upload your first media by tapping on the add button.</string>
|
|||
<string name="wallpaper_set_unsuccessfully">Something went wrong. Could not set the wallpaper</string>
|
||||
<string name="setting_wallpaper_dialog_title">Set as Wallpaper</string>
|
||||
<string name="setting_wallpaper_dialog_message">Setting Wallpaper. Please wait…</string>
|
||||
<string name="theme_default_name">Default</string>
|
||||
<string name="theme_dark_name">Dark</string>
|
||||
<string name="theme_light_name">Light</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -5,11 +5,13 @@
|
|||
<fr.free.nrw.commons.ui.LongTitlePreferences.LongTitlePreferenceCategory
|
||||
android:title="@string/preference_category_appearance">
|
||||
|
||||
<fr.free.nrw.commons.ui.LongTitlePreferences.LongTitleSwitchPreference
|
||||
android:title="@string/preference_theme"
|
||||
android:defaultValue="false"
|
||||
android:summary="@string/preference_theme_summary"
|
||||
android:key="theme" />
|
||||
<fr.free.nrw.commons.ui.LongTitlePreferences.LongTitleListPreference
|
||||
android:key="appThemePref"
|
||||
android:title= "@string/preference_theme"
|
||||
android:entries="@array/pref_theme_entries"
|
||||
android:entryValues="@array/pref_theme_entries_values"
|
||||
android:defaultValue="0"
|
||||
android:summary="@string/theme_default_name" />
|
||||
|
||||
</fr.free.nrw.commons.ui.LongTitlePreferences.LongTitlePreferenceCategory>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue