Cherish:Toggle for bolt icon when charging [2/2]

Make sure the switch is enabled only when relevant
This commit is contained in:
Hưng Phan
2020-09-01 22:07:04 +07:00
parent c95194f7f1
commit fad857d2ba
4 changed files with 50 additions and 3 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="M11 9.47V11H14.76L13 14.53V13H9.24L11 9.47M13 1L6 15H11V23L18 9H13V1Z" />
</vector>

View File

@@ -214,6 +214,8 @@
<string name="status_bar_battery_percentage_text_next">Next to the icon</string>
<string name="status_bar_battery_text_charging_title">Battery percentage when charging</string>
<string name="status_bar_battery_text_charging_summary">Always display battery percentage when charging</string>
<string name="status_bar_battery_charging_bolt_title">Show charging bolt</string>
<string name="status_bar_battery_charging_bolt_summary">Show a \u26A1\uFE0E symbol near battery text when charging</string>
<!-- Battery mode -->
<string name="battery_title">Battery icon</string>

View File

@@ -151,6 +151,13 @@
android:title="@string/status_bar_battery_text_charging_title"
android:summary="@string/status_bar_battery_text_charging_summary"
android:defaultValue="true" />
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="status_bar_battery_charging_bolt"
android:icon="@drawable/ic_lighting_bolt"
android:title="@string/status_bar_battery_charging_bolt_title"
android:summary="@string/status_bar_battery_charging_bolt_summary"
android:defaultValue="true" />
</PreferenceCategory>
</PreferenceScreen>