Cherish:Add more switch styles[2/3]

This commit is contained in:
Hưng Phan
2020-05-23 21:28:56 +07:00
committed by Hung Phan
parent 378706a0fa
commit 879faa2953
3 changed files with 15 additions and 2 deletions

View File

@@ -359,10 +359,18 @@
<item>@string/switch_default</item>
<item>@string/switch_md2</item>
<item>@string/switch_oneplus</item>
<item>@string/switch_narrow</item>
<item>@string/switch_contained</item>
<item>@string/switch_retro</item>
<item>@string/switch_stockish</item>
</string-array>
<string-array name="switch_style_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
</string-array>
</resources>

View File

@@ -441,10 +441,14 @@
<string name="force_expanded_notifications_title">Force expanded notifications</string>
<string name="force_expanded_notifications_summary">Force apps that support expanded notifications</string>
<!-- Switch styles -->
<!-- Switch styles -->
<string name="switch_style_title">Switch appearance</string>
<string name="switch_default">Default</string>
<string name="switch_md2">Material Design 2</string>
<string name="switch_oneplus">OnePlus</string>
<string name="switch_narrow">Narrow</string>
<string name="switch_contained">Contained</string>
<string name="switch_retro">Retro</string>
<string name="switch_stockish">Stockish</string>
</resources>

View File

@@ -134,6 +134,7 @@ public class ThemeSettings extends SettingsPreferenceFragment implements
@Override
public boolean onPreferenceChange(Preference preference, Object objValue) {
ContentResolver resolver = getActivity().getContentResolver();
if (preference == mThemeSwitch) {
String theme_switch = (String) objValue;
final Context context = getContext();
@@ -332,4 +333,4 @@ public class ThemeSettings extends SettingsPreferenceFragment implements
return MetricsProto.MetricsEvent.CHERISH_SETTINGS;
}
}
}