Cherish:Allow hiding battery icon from QS header [2/2]

This commit is contained in:
idoybh
2020-09-01 01:07:17 +07:00
committed by Hưng Phan
parent 43049fcbf7
commit a127508df4
4 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="?android:attr/colorControlNormal" android:pathData="M16,20H8V6H16M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z" />
</vector>

View File

@@ -216,6 +216,9 @@
<string name="status_bar_battery_text_charging_summary">Always display battery percentage when charging</string>
<!-- Battery mode -->
<string name="battery_title">Battery icon</string>
<string name="qs_hide_battery_title">Hide battery icon</string>
<string name="qs_hide_battery_summary">Hides the battery icon from the QS header</string>
<string name="battery_percentage_title">Battery percentage</string>
<string name="battery_percentage_off">Disabled</string>
<string name="battery_percentage_next">Enabled</string>

View File

@@ -219,6 +219,17 @@
</PreferenceCategory>
<PreferenceCategory
android:title="@string/battery_title">
<!-- Battery hide -->
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="qs_hide_battery"
android:icon="@drawable/ic_battery_outline"
android:title="@string/qs_hide_battery_title"
android:summary="@string/qs_hide_battery_summary"
android:defaultValue="false" />
<com.cherish.settings.preferences.SystemSettingListPreference
android:key="qs_battery_mode"
android:icon="@drawable/ic_battery_percent"
@@ -226,5 +237,7 @@
android:entries="@array/qs_battery_mode_entries"
android:entryValues="@array/qs_battery_mode_values"
android:defaultValue="1" />
</PreferenceCategory>
</PreferenceScreen>