Theming improvements (#502)

* Split theme definitions into day and night

* Add support for Night Mode in code

* Add theme chooser in preferences

* Fix translations

* Adjust IDs

* Adjust preferences for custom themes

* UI tweaks for custom theme support

* Added code for custom theme support 🍅

* Fixed resource display in Kotlin 🍅

* Restored styles

* Updated strings

* Fixed getIdentifier() to fit into setTheme()

* Removed redundant resources

* Reset default theme to "Dusky"

* Fixed night mode handler to maintain compatibility

* Refactor functions to use helper methods

* Added license block

* Added preview to theme selector

* Added color identifier getter helper method

* Fixed reference in AccountMediaFragment

* Cleanup

* Fixed navbar foreground not changing color

* Fix fallback theme switch(){}

* Enable location-based daylight trigger

* Cleanup

* Modified theming strategy to reduce clutter in preferences

* Updated translations for latest version

* Removed "Default" theme flavor from settings

* Updated Polish translations 🇵🇱

* Modified TwilightManager handling code to support Android M's UiModeManager features and moved it to its own function

* Updated Polish translations 🇵🇱

* Cleanup; Fixed hardcoded string

* Added missing escape in string

* Removed permission request dialog.

As we now use native UiModeManager APIs that don't need special permission for Android 6.0 and above, we no longer need to bother user with Android M+ specific location permission request dialog.

* Increased readability of ThemeUtil class

* Refactored ThemeUtils.setAppNightMode method

* Cleanup
This commit is contained in:
remi6397 2018-01-20 13:39:01 +01:00 committed by Konrad Pozniak
commit 11105f4aac
28 changed files with 341 additions and 142 deletions

View file

@ -151,7 +151,6 @@
<string name="pref_title_notification_filter_reblogs">تُرقّى منشوراتي</string>
<string name="pref_title_notification_filter_favourites">يعجب أحد ما بمنشوراتي</string>
<string name="pref_title_appearance_settings">المظهر</string>
<string name="pref_title_light_theme">إستخدم سمةً فاتحة اللون</string>
<string name="pref_title_browser_settings">المتصفح</string>
<string name="pref_title_custom_tabs">إخفاء زر المتابعة أثناء تمرير الصفحة</string>
<string name="pref_title_hide_follow_button">إخفاء زر التحرير عند التمرير</string>

View file

@ -166,7 +166,6 @@
<string name="pref_title_notification_filter_reblogs">retootejen les meves publicacions</string>
<string name="pref_title_notification_filter_favourites">marquen com a preferit les meves publicacions</string>
<string name="pref_title_appearance_settings">Aparença</string>
<string name="pref_title_light_theme">Usa el tema clar</string>
<string name="pref_title_browser_settings">Navegador</string>
<string name="pref_title_custom_tabs">Pestanyes personalitzades del Chrome</string>
<string name="pref_title_hide_follow_button">Amaga el botó de redacció en desplaçament</string>

View file

@ -140,7 +140,6 @@
<string name="pref_title_notification_filter_reblogs">Jemand meine Posts teilt</string>
<string name="pref_title_notification_filter_favourites">Jemandem meine Posts gefallen</string>
<string name="pref_title_appearance_settings">Aussehen</string>
<string name="pref_title_light_theme">Benutze helles Theme</string>
<string name="pref_title_browser_settings">Browser</string>
<string name="pref_title_custom_tabs">Öffne Links in der App</string>
<string name="pref_title_hide_follow_button">Verstecke Button bei Bildlauf </string>

View file

@ -152,7 +152,6 @@
<string name="pref_title_notification_filter_reblogs">mes pouets sont boostés.</string>
<string name="pref_title_notification_filter_favourites">mes pouets sont mis en favoris.</string>
<string name="pref_title_appearance_settings">Apparence</string>
<string name="pref_title_light_theme">Utiliser le thème clair.</string>
<string name="pref_title_browser_settings">Navigateur</string>
<string name="pref_title_custom_tabs">Utiliser le navigateur intégré.</string>
<string name="pref_title_hide_follow_button">Masquer le bouton de suivi lors du défilement.</string>

View file

@ -163,7 +163,6 @@
<string name="pref_title_notification_filter_reblogs">posztjaimat rebloggolták</string>
<string name="pref_title_notification_filter_favourites">posztjaimat kedvencé teszik</string>
<string name="pref_title_appearance_settings">Kinézet</string>
<string name="pref_title_light_theme">Használja a világos témát</string>
<string name="pref_title_browser_settings">Böngésző</string>
<string name="pref_title_custom_tabs">Linkek megnyitása applikáción belül</string>
<string name="pref_title_hide_follow_button">Szerkesztési gomb elérejtése görgetés közben</string>

View file

@ -164,7 +164,6 @@
<string name="pref_title_notification_filter_reblogs">投稿がブーストされた</string>
<string name="pref_title_notification_filter_favourites">投稿がお気に入りに登録された</string>
<string name="pref_title_appearance_settings">表示</string>
<string name="pref_title_light_theme">明るいテーマを使用</string>
<string name="pref_title_browser_settings">ブラウザ</string>
<string name="pref_title_custom_tabs">Chrome Custom Tabsを使用する</string>
<string name="pref_title_hide_follow_button">スクロール中はフォローボタンを隠す</string>

View file

@ -0,0 +1,10 @@
<resources>
<!--Dark Application Theme Styles-->
<style name="AppTheme" parent="AppThemeBase">
<item name="android:windowLightNavigationBar">false</item>
<item name="android:navigationBarColor">@color/window_background_dark</item>
<item name="android:navigationBarDividerColor">@color/status_divider_dark</item>
</style>
</resources>

View file

@ -0,0 +1,90 @@
<resources>
<!--Dark Application Theme Styles-->
<style name="AppTheme" parent="AppThemeBase"/>
<style name="AppThemeBase" parent="Theme.AppCompat.NoActionBar">
<item name="colorPrimary">@color/color_primary_dark</item>
<item name="colorPrimaryDark">@color/color_primary_dark_dark</item>
<item name="colorAccent">@color/color_accent_dark</item>
<item name="colorButtonNormal">@color/button_dark</item>
<item name="android:colorBackground">@color/color_primary_dark_dark</item>
<item name="android:windowBackground">@color/window_background_dark</item>
<item name="android:editTextColor">@color/edit_text_color_dark</item>
<item name="android:textColorPrimary">@color/text_color_primary_dark</item>
<item name="android:textColorSecondary">@color/text_color_secondary_dark</item>
<item name="android:textColorTertiary">@color/text_color_tertiary_dark</item>
<item name="android:textColorPrimaryInverse">@color/text_color_primary_inverse_dark</item>
<item name="android:textColorSecondaryInverse">@color/text_color_secondary_inverse_dark</item>
<item name="android:textColorTertiaryInverse">@color/text_color_tertiary_inverse_dark</item>
<item name="android:actionMenuTextColor">@color/text_color_primary_dark</item>
<item name="bottomSheetDialogTheme">@style/AppTheme.BottomSheetDialog.Dark</item>
<item name="window_background">@color/window_background_dark</item>
<item name="custom_tab_toolbar">@color/custom_tab_toolbar_dark</item>
<item name="toolbar_background_color">@color/toolbar_background_dark</item>
<item name="toolbar_icon_tint">@color/toolbar_icon_dark</item>
<item name="image_button_style">@style/AppTheme.ImageButton.Dark</item>
<item name="status_reblog_small_drawable">@drawable/ic_reblog_dark_18dp</item>
<item name="status_reblog_inactive_drawable">@drawable/reblog_inactive_dark</item>
<item name="status_reblog_disabled_drawable">@drawable/reblog_disabled_dark</item>
<item name="status_reblog_direct_drawable">@drawable/reblog_direct_dark</item>
<item name="status_favourite_active_drawable">@drawable/favourite_active_dark</item>
<item name="status_favourite_inactive_drawable">@drawable/favourite_inactive_dark</item>
<item name="content_warning_button">@drawable/toggle_small</item>
<item name="sensitive_media_warning_background_color">@color/color_background_dark</item>
<item name="media_preview_unloaded_drawable">@drawable/media_preview_unloaded_dark</item>
<item name="status_divider_drawable">@drawable/status_divider_dark</item>
<item name="conversation_thread_line_drawable">@drawable/conversation_thread_line_dark</item>
<item name="tab_icon_selected_tint">@color/color_accent_dark</item>
<item name="tab_page_margin_drawable">@drawable/tab_page_margin_dark</item>
<item name="account_header_background_color">@color/account_header_background_dark</item>
<item name="account_toolbar_icon_tint_uncollapsed">@color/toolbar_icon_dark</item>
<item name="account_toolbar_icon_tint_collapsed">@color/account_toolbar_icon_collapsed_dark</item>
<item name="account_toolbar_popup_theme">@style/AppTheme.Account.ToolbarPopupTheme.Dark</item>
<item name="compose_close_button_tint">@color/toolbar_icon_dark</item>
<item name="compose_media_button_tint">@color/compose_media_button_dark</item>
<item name="compose_media_button_disabled_tint">@color/compose_media_button_disabled_dark</item>
<item name="compose_mention_color">@color/color_accent_dark</item>
<item name="compose_content_warning_bar_background">@drawable/border_background_dark</item>
<item name="compose_hide_media_button_color">@color/image_button_dark</item>
<item name="compose_hide_media_button_selected_color">@color/color_accent_dark</item>
<item name="compose_image_button_tint">@color/image_button_dark</item>
<item name="compose_reply_content_background">@color/compose_reply_content_background_dark</item>
<item name="report_status_background_color">@color/color_background_dark</item>
<item name="report_status_divider_drawable">@drawable/status_divider_dark</item>
<item name="material_drawer_background">@color/window_background_dark</item>
<item name="material_drawer_primary_text">@color/text_color_primary_dark</item>
<item name="material_drawer_primary_icon">@color/toolbar_icon_dark</item>
<item name="material_drawer_secondary_text">@color/text_color_secondary_dark</item>
<item name="material_drawer_hint_text">@color/text_color_tertiary_dark</item>
<item name="material_drawer_divider">@color/color_primary_dark_dark</item>
<item name="material_drawer_selected">@color/color_primary_dark</item>
<item name="material_drawer_selected_text">@color/text_color_primary_dark</item>
<item name="material_drawer_header_selection_text">@color/text_color_primary_dark</item>
<item name="card_background">@drawable/card_frame_dark</item>
<item name="card_image_background">@color/text_color_tertiary_dark</item>
<item name="play_indicator_drawable">@drawable/ic_play_indicator_dark</item>
</style>
<style name="AppTheme.ImageButton.Dark" parent="@style/Widget.AppCompat.Button.Borderless.Colored">
<item name="android:tint">@color/image_button_dark</item>
</style>
<style name="AppTheme.BottomSheetDialog.Dark" parent="@style/Theme.Design.BottomSheetDialog">
<item name="colorAccent">@color/color_accent_dark</item>
<item name="android:colorBackground">@color/color_background_dark</item>
</style>
<style name="AppTheme.Account.ToolbarPopupTheme.Dark" parent="ThemeOverlay.AppCompat">
<item name="android:textColorPrimary">@color/text_color_primary_dark</item>
<item name="android:windowActionBarOverlay">true</item>
<item name="windowActionBarOverlay">true</item>
</style>
</resources>

View file

@ -140,7 +140,6 @@
<string name="pref_title_notification_filter_reblogs">mijn toots werden geboost</string>
<string name="pref_title_notification_filter_favourites">mijn toots favoriet zijn</string>
<string name="pref_title_appearance_settings">Uiterlijk</string>
<string name="pref_title_light_theme">Licht thema gebruiken</string>
<string name="pref_title_browser_settings">Webbrowser</string>
<string name="pref_title_custom_tabs">Gebruik Chrome aangepaste tabbladen</string>
<string name="pref_title_hide_follow_button">Verberg volgknop tijdens scrollen</string>

View file

@ -157,7 +157,15 @@
<string name="pref_title_notification_filter_reblogs">moje posty zostaną podbite</string>
<string name="pref_title_notification_filter_favourites">moje posty zostaną dodane do ulubionych</string>
<string name="pref_title_appearance_settings">Wygląd</string>
<string name="pref_title_light_theme">Użyj jasnego motywu</string>
<string name="pref_title_app_theme">Motyw</string>
<string name="pref_title_app_theme_flavor">Odmiana motywu</string>
<string-array name="app_theme_flavor_names">
<item>Pora dnia</item>
<item>Noc</item>
<item>Dzień</item>
</string-array>
<string name="pref_title_browser_settings">Przeglądarka</string>
<string name="pref_title_custom_tabs">Używaj niestandardowych kart Chrome</string>
<string name="pref_title_hide_follow_button">Ukryj przycisk obserwacji podczas przewijania</string>

View file

@ -166,7 +166,6 @@
<string name="pref_title_notification_filter_reblogs">minhas postagens forem compartilhadas</string>
<string name="pref_title_notification_filter_favourites">minhas postagens forem favoritadas</string>
<string name="pref_title_appearance_settings">Aparência</string>
<string name="pref_title_light_theme">Usar tema diurno</string>
<string name="pref_title_browser_settings">Navegador</string>
<string name="pref_title_custom_tabs">Usar abas customizadas do Chrome</string>
<string name="pref_title_hide_follow_button">Esconder botão de composição enquanto rolar página</string>

View file

@ -160,7 +160,6 @@
<string name="pref_title_notification_filter_reblogs">мой пост продвинули</string>
<string name="pref_title_notification_filter_favourites">мой пост понравился</string>
<string name="pref_title_appearance_settings">Внешний вид</string>
<string name="pref_title_light_theme">Использовать светлую тему</string>
<string name="pref_title_browser_settings">Браузер</string>
<string name="pref_title_custom_tabs">Использовать Chrome Custom Tabs</string>
<string name="pref_title_hide_follow_button">Скрывать кнопку подписки при покрутке</string>

View file

@ -146,7 +146,6 @@
<string name="pref_title_notification_filter_reblogs">iletilerim yüksetilince</string>
<string name="pref_title_notification_filter_favourites">iletilerim favori edilince</string>
<string name="pref_title_appearance_settings">Görünüş</string>
<string name="pref_title_light_theme">ık renkli temayı kullan</string>
<string name="pref_title_browser_settings">Tarayacı</string>
<string name="pref_title_custom_tabs">Chrome Özel Şekmelerini Kullan</string>
<string name="pref_title_hide_follow_button">Kaydırırken takip düğmesi gizlensin</string>

View file

@ -1,14 +1,13 @@
<resources>
<!--Dark Application Theme Styles-->
<!--Light Application Theme Styles-->
<style name="AppTheme" parent="AppThemeBase">
<item name="android:windowLightNavigationBar">false</item>
<item name="android:navigationBarColor">@color/window_background_dark</item>
<item name="android:navigationBarDividerColor">@color/status_divider_dark</item>
<item name="android:windowLightNavigationBar">true</item>
<item name="android:navigationBarColor">@color/color_background_light</item>
<item name="android:navigationBarDividerColor">@color/status_divider_light</item>
</style>
<!--Light Application Theme Styles-->
<style name="AppTheme.Light" parent="AppThemeBase.Light">
<style name="Remin" parent="ReminBase">
<item name="android:windowLightNavigationBar">true</item>
<item name="android:navigationBarColor">@color/color_background_light</item>
<item name="android:navigationBarDividerColor">@color/status_divider_light</item>

View file

@ -11,6 +11,8 @@
</declare-styleable>
<!--Themed Attributes-->
<attr name="window_background" format="reference" />
<attr name="custom_tab_toolbar" format="reference" />
<attr name="toolbar_background_color" format="reference" />
<attr name="toolbar_icon_tint" format="reference" />
<attr name="image_button_style" format="reference" />

View file

@ -29,4 +29,15 @@
<item>medium</item>
<item>large</item>
</string-array>
<string-array name="app_theme_values">
<item>AppTheme:prefer:night</item>
<item>Remin:only:day</item>
</string-array>
<string-array name="app_theme_flavor_values">
<item>auto</item>
<item>night</item>
<item>day</item>
</string-array>
</resources>

View file

@ -147,7 +147,7 @@
<string name="dialog_download_image">Download</string>
<string name="dialog_message_follow_request">Follow request pending: awaiting their response</string>
<string name="dialog_unfollow_warning">Unfollow this account?</string>
<string name="dialog_reply_not_found">Couldn\'t post this status. The status you\'re replying to might not be available. Remove reply info?</string>
<string name="dialog_reply_not_found">Couldn\'t post this status. The status you\'re replying to might not be available. Remove reply info?</string>
<string name="visibility_public">Public: Post to public timelines</string>
<string name="visibility_unlisted">Unlisted: Do not show in public timelines</string>
@ -168,7 +168,20 @@
<string name="pref_title_notification_filter_reblogs">my posts are boosted</string>
<string name="pref_title_notification_filter_favourites">my posts are favourited</string>
<string name="pref_title_appearance_settings">Appearance</string>
<string name="pref_title_light_theme">Use the Light Theme</string>
<string name="pref_title_app_theme">App Theme</string>
<string-array name="app_theme_names">
<item>Tusky</item>
<item>Remin</item>
</string-array>
<string name="pref_title_app_theme_flavor">Theme flavor</string>
<string-array name="app_theme_flavor_names">
<item>Sunset/Sunrise</item>
<item>Night</item>
<item>Day</item>
</string-array>
<string name="pref_title_browser_settings">Browser</string>
<string name="pref_title_custom_tabs">Use Chrome Custom Tabs</string>
<string name="pref_title_hide_follow_button">Hide compose button while scrolling</string>
@ -280,5 +293,4 @@
<string name="action_set_caption">Set caption</string>
<string name="action_remove_media">Remove</string>
</resources>

View file

@ -32,95 +32,9 @@
<item name="android:windowNoTitle">true</item>
</style>
<!--Dark Application Theme Styles-->
<style name="AppTheme" parent="AppThemeBase"/>
<style name="AppThemeBase" parent="Theme.AppCompat.NoActionBar">
<item name="colorPrimary">@color/color_primary_dark</item>
<item name="colorPrimaryDark">@color/color_primary_dark_dark</item>
<item name="colorAccent">@color/color_accent_dark</item>
<item name="colorButtonNormal">@color/button_dark</item>
<item name="android:colorBackground">@color/color_primary_dark_dark</item>
<item name="android:windowBackground">@color/window_background_dark</item>
<item name="android:editTextColor">@color/edit_text_color_dark</item>
<item name="android:textColorPrimary">@color/text_color_primary_dark</item>
<item name="android:textColorSecondary">@color/text_color_secondary_dark</item>
<item name="android:textColorTertiary">@color/text_color_tertiary_dark</item>
<item name="android:textColorPrimaryInverse">@color/text_color_primary_inverse_dark</item>
<item name="android:textColorSecondaryInverse">@color/text_color_secondary_inverse_dark</item>
<item name="android:textColorTertiaryInverse">@color/text_color_tertiary_inverse_dark</item>
<item name="android:actionMenuTextColor">@color/text_color_primary_dark</item>
<item name="bottomSheetDialogTheme">@style/AppTheme.BottomSheetDialog.Dark</item>
<item name="toolbar_background_color">@color/toolbar_background_dark</item>
<item name="toolbar_icon_tint">@color/toolbar_icon_dark</item>
<item name="image_button_style">@style/AppTheme.ImageButton.Dark</item>
<item name="status_reblog_small_drawable">@drawable/ic_reblog_dark_18dp</item>
<item name="status_reblog_inactive_drawable">@drawable/reblog_inactive_dark</item>
<item name="status_reblog_disabled_drawable">@drawable/reblog_disabled_dark</item>
<item name="status_reblog_direct_drawable">@drawable/reblog_direct_dark</item>
<item name="status_favourite_active_drawable">@drawable/favourite_active_dark</item>
<item name="status_favourite_inactive_drawable">@drawable/favourite_inactive_dark</item>
<item name="content_warning_button">@drawable/toggle_small</item>
<item name="sensitive_media_warning_background_color">@color/color_background_dark</item>
<item name="media_preview_unloaded_drawable">@drawable/media_preview_unloaded_dark</item>
<item name="status_divider_drawable">@drawable/status_divider_dark</item>
<item name="conversation_thread_line_drawable">@drawable/conversation_thread_line_dark</item>
<item name="tab_icon_selected_tint">@color/color_accent_dark</item>
<item name="tab_page_margin_drawable">@drawable/tab_page_margin_dark</item>
<item name="account_header_background_color">@color/account_header_background_dark</item>
<item name="account_toolbar_icon_tint_uncollapsed">@color/toolbar_icon_dark</item>
<item name="account_toolbar_icon_tint_collapsed">@color/account_toolbar_icon_collapsed_dark</item>
<item name="account_toolbar_popup_theme">@style/AppTheme.Account.ToolbarPopupTheme.Dark</item>
<item name="compose_close_button_tint">@color/toolbar_icon_dark</item>
<item name="compose_media_button_tint">@color/compose_media_button_dark</item>
<item name="compose_media_button_disabled_tint">@color/compose_media_button_disabled_dark</item>
<item name="compose_mention_color">@color/color_accent_dark</item>
<item name="compose_content_warning_bar_background">@drawable/border_background_dark</item>
<item name="compose_hide_media_button_color">@color/image_button_dark</item>
<item name="compose_hide_media_button_selected_color">@color/color_accent_dark</item>
<item name="compose_image_button_tint">@color/image_button_dark</item>
<item name="compose_reply_content_background">@color/compose_reply_content_background_dark</item>
<item name="report_status_background_color">@color/color_background_dark</item>
<item name="report_status_divider_drawable">@drawable/status_divider_dark</item>
<item name="material_drawer_background">@color/window_background_dark</item>
<item name="material_drawer_primary_text">@color/text_color_primary_dark</item>
<item name="material_drawer_primary_icon">@color/toolbar_icon_dark</item>
<item name="material_drawer_secondary_text">@color/text_color_secondary_dark</item>
<item name="material_drawer_hint_text">@color/text_color_tertiary_dark</item>
<item name="material_drawer_divider">@color/color_primary_dark_dark</item>
<item name="material_drawer_selected">@color/color_primary_dark</item>
<item name="material_drawer_selected_text">@color/text_color_primary_dark</item>
<item name="material_drawer_header_selection_text">@color/text_color_primary_dark</item>
<item name="card_background">@drawable/card_frame_dark</item>
<item name="card_image_background">@color/text_color_tertiary_dark</item>
<item name="play_indicator_drawable">@drawable/ic_play_indicator_dark</item>
</style>
<style name="AppTheme.ImageButton.Dark" parent="@style/Widget.AppCompat.Button.Borderless.Colored">
<item name="android:tint">@color/image_button_dark</item>
</style>
<style name="AppTheme.BottomSheetDialog.Dark" parent="@style/Theme.Design.BottomSheetDialog">
<item name="colorAccent">@color/color_accent_dark</item>
<item name="android:colorBackground">@color/color_background_dark</item>
</style>
<style name="AppTheme.Account.ToolbarPopupTheme.Dark" parent="ThemeOverlay.AppCompat">
<item name="android:textColorPrimary">@color/text_color_primary_dark</item>
<item name="android:windowActionBarOverlay">true</item>
<item name="windowActionBarOverlay">true</item>
</style>
<!--Light Application Theme Styles-->
<style name="AppTheme.Light" parent="AppThemeBase.Light"/>
<style name="AppThemeBase.Light" parent="Theme.AppCompat.Light.NoActionBar">
<style name="AppTheme" parent="AppThemeBase"/>
<style name="AppThemeBase" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/color_primary_light</item>
<item name="colorPrimaryDark">@color/color_primary_dark_light</item>
<item name="colorAccent">@color/color_accent_light</item>
@ -139,6 +53,8 @@
<item name="bottomSheetDialogTheme">@style/AppTheme.BottomSheetDialog.Light</item>
<item name="window_background">@color/window_background_light</item>
<item name="custom_tab_toolbar">@color/custom_tab_toolbar_light</item>
<item name="toolbar_background_color">@color/toolbar_background_light</item>
<item name="toolbar_icon_tint">@color/toolbar_icon_light</item>
<item name="image_button_style">@style/AppTheme.ImageButton.Light</item>
@ -187,7 +103,15 @@
<item name="play_indicator_drawable">@drawable/ic_play_indicator_light</item>
</style>
</style>
<style name="Remin" parent="ReminBase"/>
<style name="ReminBase" parent="AppThemeBase">
<item name="colorAccent">#e5ac00</item>
<item name="colorButtonNormal">#e8c14e</item>
<item name="tab_icon_selected_tint">#e2b62f</item>
<item name="compose_hide_media_button_selected_color">#f4c842</item>
</style>
<style name="AppTheme.ImageButton.Light" parent="Widget.AppCompat.Button.Borderless.Colored">
<item name="android:tint">@color/image_button_light</item>

View file

@ -4,10 +4,20 @@
<PreferenceCategory android:title="@string/pref_title_appearance_settings">
<CheckBoxPreference
android:defaultValue="false"
android:key="lightTheme"
android:title="@string/pref_title_light_theme" />
<ListPreference
android:defaultValue="AppTheme:prefer:night"
android:entries="@array/app_theme_names"
android:entryValues="@array/app_theme_values"
android:key="appTheme"
android:summary="%s"
android:title="@string/pref_title_app_theme" />
<ListPreference
android:entries="@array/app_theme_flavor_names"
android:entryValues="@array/app_theme_flavor_values"
android:key="appThemeFlavor"
android:summary="%s"
android:title="@string/pref_title_app_theme_flavor" />
<ListPreference
android:defaultValue="medium"