Cherish: Refactor qs tiles layout fragment

Signed-off-by: cjh1249131356 <cjh1249131356@gmail.com>
Signed-off-by: minaripenguin <minaripenguin@users.noreply.github.com>
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
cjh1249131356
2023-02-21 10:35:20 +08:00
committed by Hưng Phan
parent ee5ae1eb2f
commit a57d28d4a0
5 changed files with 260 additions and 53 deletions

View File

@@ -96,43 +96,12 @@
android:key="qs_layout_category"
android:title="@string/qs_layout_category_title">
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="qs_tile_label_hide"
android:title="@string/qs_tile_label_hide_title"
android:summary="@string/qs_tile_label_hide_summary"
android:defaultValue="false" />
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
android:key="qs_tile_label_size"
android:title="@string/qs_tile_label_size_title"
android:max="15"
settings:min="10"
settings:interval="1"
settings:units="sp"
android:defaultValue="14" />
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="qs_tile_vertical_layout"
android:title="@string/qs_tile_layout_title"
android:summary="@string/qs_tile_layout_summary"
android:defaultValue="false" />
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
android:key="qs_layout_columns"
android:title="@string/qs_columns_portrait_title"
android:max="5"
settings:min="2"
settings:interval="1"
android:defaultValue="2" />
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
android:key="qs_layout_columns_landscape"
android:title="@string/qs_columns_landscape_title"
android:max="6"
settings:min="2"
settings:interval="1"
android:defaultValue="4" />
<Preference
android:key="qs_tile_layout"
android:icon="@drawable/ic_qs_tile"
android:title="@string/qs_tile_layout_title"
android:summary="@string/qs_tile_layout_summary"
android:fragment="com.cherish.settings.fragments.QsTileLayoutSettings" />
</PreferenceCategory>

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
android:title="@string/qs_tile_layout_title">
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="qs_tile_label_hide"
android:title="@string/qs_tile_hide_label_title"
android:summary="@string/qs_tile_hide_label_summary"
android:defaultValue="false" />
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="qs_tile_vertical_layout"
android:title="@string/qs_tile_vertical_layout_title"
android:summary="@string/qs_tile_vertical_layout_summary"
android:defaultValue="false" />
<PreferenceCategory
android:key="tiles_layout"
android:title="@string/qs_tiles_layout_category">
<com.cherish.settings.preferences.CustomSeekBarPreference
android:key="qs_layout_columns"
android:title="@string/qs_columns_portrait_title"
android:defaultValue="2"
android:max="6"
settings:min="2" />
<com.cherish.settings.preferences.CustomSeekBarPreference
android:key="qs_layout_rows"
android:title="@string/qs_rows_portrait_title"
android:defaultValue="4"
android:max="6"
settings:min="2" />
<com.cherish.settings.preferences.CustomSeekBarPreference
android:key="qqs_layout_rows"
android:title="@string/qqs_rows_portrait_title"
android:defaultValue="2"
android:max="5"
settings:min="1" />
<com.android.settingslib.widget.LayoutPreference
android:key="apply_change_button"
android:layout="@layout/qs_tile_apply_change_button" />
</PreferenceCategory>
</PreferenceScreen>