From 77f38037b387f0c1be1a3eb99cc26f63d5849314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C6=B0ng=20Phan?= Date: Sat, 18 Dec 2021 19:50:19 +0700 Subject: [PATCH] Cherish:move all theming stuffs to our Theme Settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hưng Phan --- res/values/cherish_strings.xml | 14 ++++++++++++- res/xml/cherish_settings_theme.xml | 21 ++++++++++++++++++- .../settings/fragments/ThemeSettings.java | 7 +++++++ 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/res/values/cherish_strings.xml b/res/values/cherish_strings.xml index 1710dbb..553d1bd 100644 --- a/res/values/cherish_strings.xml +++ b/res/values/cherish_strings.xml @@ -528,5 +528,17 @@ Megabytes per second (MB/s) Hide arrows Hide the network traffic indicator arrows - + + + Browse the dark theme options + + Theming + + Accent color + + Headline / Body font + + Icon shape + + Statusbar icon diff --git a/res/xml/cherish_settings_theme.xml b/res/xml/cherish_settings_theme.xml index 5061fbc..d2dc0cb 100644 --- a/res/xml/cherish_settings_theme.xml +++ b/res/xml/cherish_settings_theme.xml @@ -17,5 +17,24 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:title="@string/theme_title" xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"> - + + + + + + + + + + diff --git a/src/com/cherish/settings/fragments/ThemeSettings.java b/src/com/cherish/settings/fragments/ThemeSettings.java index d199193..9c097a1 100644 --- a/src/com/cherish/settings/fragments/ThemeSettings.java +++ b/src/com/cherish/settings/fragments/ThemeSettings.java @@ -49,6 +49,9 @@ import com.android.settingslib.core.AbstractPreferenceController; import com.android.settings.SettingsPreferenceFragment; import com.android.settingslib.core.AbstractPreferenceController; import com.android.settingslib.core.lifecycle.Lifecycle; +import com.android.settings.development.OverlayCategoryPreferenceController; +import com.android.settingslib.core.AbstractPreferenceController; +import com.android.settingslib.core.lifecycle.Lifecycle; import java.util.Locale; import android.text.TextUtils; import android.view.View; @@ -93,6 +96,10 @@ public class ThemeSettings extends DashboardFragment implements OnPreferenceChan Context context, Lifecycle lifecycle, Fragment fragment) { final List controllers = new ArrayList<>(); + controllers.add(new OverlayCategoryPreferenceController(context, + "android.theme.customization.font")); + controllers.add(new OverlayCategoryPreferenceController(context, + "android.theme.customization.icon_pack")); return controllers; }