[app] Update preference

This commit is contained in:
tehcneko 2021-03-09 20:10:42 +08:00
parent 11da19b64c
commit dacbc8d16b
8 changed files with 197 additions and 25 deletions

View File

@ -0,0 +1,29 @@
<!--
~ This file is part of LSPosed.
~
~ LSPosed is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ LSPosed is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with LSPosed. If not, see <https://www.gnu.org/licenses/>.
~
~ Copyright (C) 2021 LSPosed Contributors
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M14,12c0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2 0.9,2 2,2 2,-0.9 2,-2zM12,3c-4.97,0 -9,4.03 -9,9L0,12l4,4 4,-4L5,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.51,0 -2.91,-0.49 -4.06,-1.3l-1.42,1.44C8.04,20.3 9.94,21 12,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9z" />
</vector>

View File

@ -0,0 +1,29 @@
<!--
~ This file is part of LSPosed.
~
~ LSPosed is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ LSPosed is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with LSPosed. If not, see <https://www.gnu.org/licenses/>.
~
~ Copyright (C) 2021 LSPosed Contributors
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M9.37,5.51C9.19,6.15 9.1,6.82 9.1,7.5c0,4.08 3.32,7.4 7.4,7.4c0.68,0 1.35,-0.09 1.99,-0.27C17.45,17.19 14.93,19 12,19c-3.86,0 -7,-3.14 -7,-7C5,9.07 6.81,6.55 9.37,5.51zM12,3c-4.97,0 -9,4.03 -9,9s4.03,9 9,9s9,-4.03 9,-9c0,-0.46 -0.04,-0.92 -0.1,-1.36c-0.98,1.37 -2.58,2.26 -4.4,2.26c-2.98,0 -5.4,-2.42 -5.4,-5.4c0,-1.81 0.89,-3.42 2.26,-4.4C12.92,3.04 12.46,3 12,3L12,3z" />
</vector>

View File

@ -0,0 +1,29 @@
<!--
~ This file is part of LSPosed.
~
~ LSPosed is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ LSPosed is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with LSPosed. If not, see <https://www.gnu.org/licenses/>.
~
~ Copyright (C) 2021 LSPosed Contributors
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M19,15v4H5v-4h14m1,-2H4c-0.55,0 -1,0.45 -1,1v6c0,0.55 0.45,1 1,1h16c0.55,0 1,-0.45 1,-1v-6c0,-0.55 -0.45,-1 -1,-1zM7,18.5c-0.82,0 -1.5,-0.67 -1.5,-1.5s0.68,-1.5 1.5,-1.5 1.5,0.67 1.5,1.5 -0.67,1.5 -1.5,1.5zM19,5v4H5V5h14m1,-2H4c-0.55,0 -1,0.45 -1,1v6c0,0.55 0.45,1 1,1h16c0.55,0 1,-0.45 1,-1V4c0,-0.55 -0.45,-1 -1,-1zM7,8.5c-0.82,0 -1.5,-0.67 -1.5,-1.5S6.18,5.5 7,5.5s1.5,0.68 1.5,1.5S7.83,8.5 7,8.5z" />
</vector>

View File

@ -0,0 +1,41 @@
<!--
~ This file is part of LSPosed.
~
~ LSPosed is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ LSPosed is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with LSPosed. If not, see <https://www.gnu.org/licenses/>.
~
~ Copyright (C) 2021 LSPosed Contributors
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,22C6.49,22 2,17.51 2,12S6.49,2 12,2s10,4.04 10,9c0,3.31 -2.69,6 -6,6h-1.77c-0.28,0 -0.5,0.22 -0.5,0.5 0,0.12 0.05,0.23 0.13,0.33 0.41,0.47 0.64,1.06 0.64,1.67 0,1.38 -1.12,2.5 -2.5,2.5zM12,4c-4.41,0 -8,3.59 -8,8s3.59,8 8,8c0.28,0 0.5,-0.22 0.5,-0.5 0,-0.16 -0.08,-0.28 -0.14,-0.35 -0.41,-0.46 -0.63,-1.05 -0.63,-1.65 0,-1.38 1.12,-2.5 2.5,-2.5L16,15c2.21,0 4,-1.79 4,-4 0,-3.86 -3.59,-7 -8,-7z" />
<path
android:fillColor="@android:color/white"
android:pathData="M6.5,11.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0" />
<path
android:fillColor="@android:color/white"
android:pathData="M9.5,7.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0" />
<path
android:fillColor="@android:color/white"
android:pathData="M14.5,7.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0" />
<path
android:fillColor="@android:color/white"
android:pathData="M17.5,11.5m-1.5,0a1.5,1.5 0,1 1,3 0a1.5,1.5 0,1 1,-3 0" />
</vector>

View File

@ -0,0 +1,29 @@
<!--
~ This file is part of LSPosed.
~
~ LSPosed is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ LSPosed is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with LSPosed. If not, see <https://www.gnu.org/licenses/>.
~
~ Copyright (C) 2021 LSPosed Contributors
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M13,11.33L18,18H6l5,-6.67V6h2M15.96,4H8.04C7.62,4 7.39,4.48 7.65,4.81L9,6.5v4.17L3.2,18.4C2.71,19.06 3.18,20 4,20h16c0.82,0 1.29,-0.94 0.8,-1.6L15,10.67V6.5l1.35,-1.69C16.61,4.48 16.38,4 15.96,4L15.96,4z" />
</vector>

View File

@ -43,7 +43,12 @@
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<!-- MIUI -->
<item name="android:forceDarkAllowed" tools:targetApi="q">false</item>
<!-- Preference title -->
<item name="android:textAppearanceListItem">?textAppearanceSubtitle1</item>
</style>
<style name="Theme.Light" parent="Base.AppTheme.Light" />
@ -70,7 +75,12 @@
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<!-- MIUI -->
<item name="android:forceDarkAllowed" tools:targetApi="q">false</item>
<!-- Preference title -->
<item name="android:textAppearanceListItem">?textAppearanceSubtitle1</item>
</style>
<style name="Theme" parent="Base.AppTheme" />

View File

@ -44,4 +44,20 @@
</style>
<style name="ThemeOverlay.Material.Dialog.ColorPicker" parent="@style/ThemeOverlay.Material.Dialog" />
<style name="PreferenceSummaryTextStyle" tools:override="true">
<item name="android:fontFamily">sans-serif</item>
<item name="android:textStyle">normal</item>
<item name="android:textAllCaps">false</item>
<item name="android:textSize">14sp</item>
<item name="android:letterSpacing">0.0178571429</item>
</style>
<style name="PreferenceCategoryTitleTextStyle" tools:override="true">
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:textAllCaps">true</item>
<item name="android:textSize">11sp</item>
<!-- 0.8 Spacing, 0.8/11 = 0.072727273 -->
<item name="android:letterSpacing">0.072727273</item>
</style>
</resources>

View File

@ -18,30 +18,26 @@
~ Copyright (C) 2021 LSPosed Contributors
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<com.takisoft.preferencex.PreferenceCategory
android:key="group_network"
android:title="@string/group_network"
app:iconSpaceReserved="false">
android:title="@string/group_network">
<SwitchPreference
android:defaultValue="false"
android:key="doh"
android:summary="@string/dns_over_http_summary"
android:title="@string/dns_over_http"
app:iconSpaceReserved="false" />
android:icon="@drawable/ic_outline_dns_24" />
</com.takisoft.preferencex.PreferenceCategory>
<com.takisoft.preferencex.PreferenceCategory
android:title="@string/settings_group_theme"
app:iconSpaceReserved="false">
<com.takisoft.preferencex.PreferenceCategory android:title="@string/settings_group_theme">
<io.github.lsposed.manager.util.theme.ThemeColorPreference
android:defaultValue=""
android:dialogTitle="@string/theme_color"
android:key="theme_color"
android:title="@string/theme_color"
app:iconSpaceReserved="false" />
android:icon="@drawable/ic_outline_palette_24" />
<rikka.preference.SimpleMenuPreference
android:defaultValue="MODE_NIGHT_FOLLOW_SYSTEM"
android:entries="@array/theme_texts"
@ -49,18 +45,16 @@
android:key="dark_theme"
android:summary="%s"
android:title="@string/dark_theme"
app:iconSpaceReserved="false" />
android:icon="@drawable/ic_outline_dark_mode_24" />
<SwitchPreference
android:key="black_dark_theme"
android:title="@string/pure_black_dark_theme"
android:summary="@string/pure_black_dark_theme_summary"
app:iconSpaceReserved="false" />
android:summary="@string/pure_black_dark_theme_summary" />
</com.takisoft.preferencex.PreferenceCategory>
<com.takisoft.preferencex.PreferenceCategory
android:key="group_framework"
android:title="@string/settings_group_framework"
app:iconSpaceReserved="false">
android:title="@string/settings_group_framework">
<SwitchPreference
android:defaultValue="false"
@ -68,30 +62,25 @@
android:summary="@string/settings_enable_resources_summary"
android:title="@string/settings_enable_resources"
android:persistent="false"
app:iconSpaceReserved="false" />
android:icon="@drawable/ic_outline_science_24" />
<SwitchPreference
android:defaultValue="false"
android:key="disable_verbose_log"
android:title="@string/pref_title_disable_verbose_log"
android:persistent="false"
app:iconSpaceReserved="false" />
android:persistent="false" />
</com.takisoft.preferencex.PreferenceCategory>
<com.takisoft.preferencex.PreferenceCategory
android:key="group_backup"
android:title="@string/settings_backup_and_restore"
app:iconSpaceReserved="false">
android:summary="@string/settings_backup_and_restore_summery"
android:icon="@drawable/ic_baseline_settings_backup_restore_24" >
<Preference
android:key="backup"
android:title="@string/settings_backup"
app:iconSpaceReserved="false" />
android:title="@string/settings_backup" />
<Preference
android:key="restore"
android:title="@string/settings_restore"
app:iconSpaceReserved="false" />
<Preference
android:summary="@string/settings_backup_and_restore_summery"
app:iconSpaceReserved="false" />
android:title="@string/settings_restore" />
</com.takisoft.preferencex.PreferenceCategory>
</PreferenceScreen>