Cherish: Add DU themes [3/3]
SDB: Adapt for AOSP Settings Special Thanks to @imjyotiraditya for the help
This commit is contained in:
10
res/drawable/ic_settings_themes.xml
Normal file
10
res/drawable/ic_settings_themes.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?android:attr/colorControlNormal">
|
||||
|
||||
<path android:fillColor="#000000"
|
||||
android:pathData="M19,19L12,11V19H5L12,11V5H19M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3Z"/>
|
||||
</vector>
|
||||
9
res/drawable/ic_system_theme.xml
Normal file
9
res/drawable/ic_system_theme.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="512"
|
||||
android:viewportHeight="512">
|
||||
<path
|
||||
android:fillColor="?android:attr/colorControlNormal"
|
||||
android:pathData="M443.5,234.5c0,-91.6 -74.5,-166 -166,-166h-42.9c-91.6,0 -166,74.5 -166,166v40.2h56.2v112.5c0,31 25.2,56.3 56.3,56.3h150c31,0 56.3,-25.2 56.3,-56.3V274.8h56.3V234.5zM349.8,387.3c0,10.3 -8.4,18.8 -18.8,18.8H181c-10.3,0 -18.8,-8.4 -18.8,-18.8V218.5h37.5v75h37.5v-75h37.5V256h37.5v-37.5h37.5V387.3zM406,237.3h-18.8V181H124.8v56.3H106v-2.7c0,-70.9 57.7,-128.5 128.5,-128.5h42.9c70.9,0 128.5,57.7 128.5,128.5V237.3z" />
|
||||
</vector>
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2016 The Nitrogen OS
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -24,6 +24,7 @@
|
||||
<string name="recents_title">Ứng dụng gần đây</string>
|
||||
<string name="statusbar_title">Thanh trạng thái</string>
|
||||
<string name="volume_title">Phím Âm lượng</string>
|
||||
<string name="theme_title">Chủ đề</string>
|
||||
<string name="notifications_title">Thông báo</string>
|
||||
<string name="device_part_title">Tính năng thiết bị</string>
|
||||
<string name="qs_category">Kiểu Qs</string>
|
||||
@@ -229,4 +230,10 @@
|
||||
<!-- Old MobileType Toggle -->
|
||||
<string name="use_old_mobiletype_title">Sử dụng kiểu di động cũ</string>
|
||||
<string name="use_old_mobiletype_summary">Hợp nhất các tín hiệu và loại biểu tượng</string>
|
||||
<!-- Themes -->
|
||||
<string name="theme_type_title">Chủ đề hệ thống</string>
|
||||
<string name="theme_type_summary">Lựa chọn chủ đê</string>
|
||||
<string name="theme_type_light">Sáng</string>
|
||||
<string name="theme_type_pitch_black">Google dark</string>
|
||||
<string name="theme_type_solarized_dark">Solarized dark</string>
|
||||
</resources>
|
||||
|
||||
@@ -264,4 +264,17 @@
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Themes -->
|
||||
<string-array name="theme_type_titles">
|
||||
<item>@string/theme_type_light</item>
|
||||
<item>@string/theme_type_pitch_black</item>
|
||||
<item>@string/theme_type_solarized_dark</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="theme_type_values">
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
<string name="misc_title">Miscellaneous</string>
|
||||
<string name="navbar_title">Navigation bar</string>
|
||||
<string name="powermenu_title">Power menu</string>
|
||||
<string name="theme_title">Themes</string>
|
||||
<string name="quicksettings_title">Quick Settings</string>
|
||||
<string name="recents_title">Recents apps</string>
|
||||
<string name="statusbar_title">Status bar</string>
|
||||
@@ -259,5 +260,12 @@
|
||||
<!-- Old MobileType Toggle -->
|
||||
<string name="use_old_mobiletype_title">Use old mobile type style</string>
|
||||
<string name="use_old_mobiletype_summary">Merge signal and type icons</string>
|
||||
|
||||
<!-- Themes -->
|
||||
<string name="theme_type_title">System theme</string>
|
||||
<string name="theme_type_summary">Select theme</string>
|
||||
<string name="theme_type_light">Light</string>
|
||||
<string name="theme_type_pitch_black">Google dark</string>
|
||||
<string name="theme_type_solarized_dark">Solarized dark</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -30,6 +30,13 @@
|
||||
android:title="@string/quicksettings_title"
|
||||
android:fragment="com.cherish.settings.fragments.QuickSettings"
|
||||
android:icon="@drawable/ic_settings_quicksettings"/>
|
||||
|
||||
<!-- Themes -->
|
||||
<Preference
|
||||
android:key="theme_category"
|
||||
android:title="@string/theme_title"
|
||||
android:fragment="com.cherish.settings.fragments.ThemeSettings"
|
||||
android:icon="@drawable/ic_settings_themes"/>
|
||||
|
||||
<!-- Buttons -->
|
||||
<Preference
|
||||
|
||||
37
res/xml/cherish_settings_theme.xml
Normal file
37
res/xml/cherish_settings_theme.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2020 CherishOS
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<PreferenceScreen
|
||||
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">
|
||||
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="system_theme_category"
|
||||
android:title="@string/theme_type_title">
|
||||
|
||||
<ListPreference
|
||||
android:key="theme_switch"
|
||||
android:icon="@drawable/ic_system_theme"
|
||||
android:title="@string/theme_type_title"
|
||||
android:summary="@string/theme_type_summary"
|
||||
android:dialogTitle="@string/theme_type_summary"
|
||||
android:entries="@array/theme_type_titles"
|
||||
android:entryValues="@array/theme_type_values"
|
||||
android:defaultValue="1"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
Reference in New Issue
Block a user