Battery light customization [2/2]
This commit is contained in:
8
res/drawable/ic_battery_almostfull.xml
Normal file
8
res/drawable/ic_battery_almostfull.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:tint="?android:attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path android:fillColor="?android:attr/colorControlNormal" android:pathData="M23,11H20V4L15,14H18V22M12,8H4V6H12M12.67,4H11V2H5V4H3.33A1.33,1.33 0 0,0 2,5.33V20.67C2,21.4 2.6,22 3.33,22H12.67C13.4,22 14,21.4 14,20.67V5.33A1.33,1.33 0 0,0 12.67,4Z" />
|
||||
</vector>
|
||||
8
res/drawable/ic_battery_full.xml
Normal file
8
res/drawable/ic_battery_full.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:tint="?android:attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path android:fillColor="?android:attr/colorControlNormal" android:pathData="M23,11H20V4L15,14H18V22M12.67,4H11V2H5V4H3.33A1.33,1.33 0 0,0 2,5.33V20.67C2,21.4 2.6,22 3.33,22H12.67C13.4,22 14,21.4 14,20.67V5.33A1.33,1.33 0 0,0 12.67,4Z" />
|
||||
</vector>
|
||||
8
res/drawable/ic_battery_low.xml
Normal file
8
res/drawable/ic_battery_low.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:tint="?android:attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path android:fillColor="?android:attr/colorControlNormal" android:pathData="M23.05,11H20.05V4L15.05,14H18.05V22M12,18H4L4.05,6H12.05M12.72,4H11.05V2H5.05V4H3.38A1.33,1.33 0 0,0 2.05,5.33V20.67C2.05,21.4 2.65,22 3.38,22H12.72C13.45,22 14.05,21.4 14.05,20.67V5.33A1.33,1.33 0 0,0 12.72,4Z" />
|
||||
</vector>
|
||||
8
res/drawable/ic_battery_medium.xml
Normal file
8
res/drawable/ic_battery_medium.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:tint="?android:attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path android:fillColor="?android:attr/colorControlNormal" android:pathData="M23,11H20V4L15,14H18V22M12,13H4V6H12M12.67,4H11V2H5V4H3.33A1.33,1.33 0 0,0 2,5.33V20.67C2,21.4 2.6,22 3.33,22H12.67C13.4,22 14,21.4 14,20.67V5.33A1.33,1.33 0 0,0 12.67,4Z" />
|
||||
</vector>
|
||||
8
res/drawable/ic_blinking.xml
Normal file
8
res/drawable/ic_blinking.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:tint="?android:attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path android:fillColor="?android:attr/colorControlNormal" android:pathData="M6,6.9L3.87,4.78L5.28,3.37L7.4,5.5L6,6.9M13,1V4H11V1H13M20.13,4.78L18,6.9L16.6,5.5L18.72,3.37L20.13,4.78M4.5,10.5V12.5H1.5V10.5H4.5M19.5,10.5H22.5V12.5H19.5V10.5M6,20H18A2,2 0 0,1 20,22H4A2,2 0 0,1 6,20M12,5A6,6 0 0,1 18,11V19H6V11A6,6 0 0,1 12,5Z" />
|
||||
</vector>
|
||||
8
res/drawable/ic_dnd.xml
Normal file
8
res/drawable/ic_dnd.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:tint="?android:attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path android:fillColor="?android:attr/colorControlNormal" android:pathData="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M17,13H7V11H17V13Z" />
|
||||
</vector>
|
||||
@@ -52,5 +52,4 @@
|
||||
<!-- QS category -->
|
||||
<string name="enable_clear_all_button">Thay thế xóa tất cả văn bản bằng nút đẹp</string>
|
||||
<string name="enable_clear_all_button_summary">Hiển thị xóa tất cả nút thông báo trong cài đặt nhanh thay vì văn bản mặc định</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -244,4 +244,15 @@
|
||||
<string name="advanced_reboot_title">Advanced restart</string>
|
||||
<string name="advanced_reboot_summary">When unlocked, include options in the power menu for restarting into recovery or bootloader</string>
|
||||
|
||||
<!-- Battery light -->
|
||||
<string name="battery_light_settings">Battery charging light</string>
|
||||
<string name="battery_light_enable">Enable</string>
|
||||
<string name="battery_light_allow_on_dnd_title">Battery light in Do Not Disturb mode</string>
|
||||
<string name="battery_light_low_blinking_title">Blinking light on low battery</string>
|
||||
<string name="battery_light_cat">Battery light color when charging</string>
|
||||
<string name="battery_light_low_color">Low battery</string>
|
||||
<string name="battery_light_medium_color">Medium battery</string>
|
||||
<string name="battery_light_full_color">Almost full battery</string>
|
||||
<string name="battery_light_reallyfull_color">Full (100) battery</string>
|
||||
|
||||
</resources>
|
||||
|
||||
66
res/xml/battery_light_settings.xml
Normal file
66
res/xml/battery_light_settings.xml
Normal file
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2017 The ABC rom
|
||||
|
||||
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"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="battery_light_enabled"
|
||||
android:icon="@drawable/ic_battery_full"
|
||||
android:title="@string/battery_light_enable"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="battery_light_allow_on_dnd"
|
||||
android:icon="@drawable/ic_dnd"
|
||||
android:title="@string/battery_light_allow_on_dnd_title"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="battery_light_low_blinking"
|
||||
android:icon="@drawable/ic_blinking"
|
||||
android:title="@string/battery_light_low_blinking_title"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="battery_light_cat"
|
||||
android:title="@string/battery_light_cat">
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="battery_light_low_color"
|
||||
android:icon="@drawable/ic_battery_low"
|
||||
android:title="@string/battery_light_low_color"
|
||||
android:defaultValue="0xFFFF0000" />
|
||||
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="battery_light_medium_color"
|
||||
android:icon="@drawable/ic_battery_medium"
|
||||
android:title="@string/battery_light_medium_color"
|
||||
android:defaultValue="0xFFFFFF00" />
|
||||
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="battery_light_full_color"
|
||||
android:icon="@drawable/ic_battery_almostfull"
|
||||
android:title="@string/battery_light_full_color"
|
||||
android:defaultValue="0xFFFFFF00" />
|
||||
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="battery_light_reallyfull_color"
|
||||
android:icon="@drawable/ic_battery_full"
|
||||
android:title="@string/battery_light_reallyfull_color"
|
||||
android:defaultValue="0xFF00FF00" />
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
@@ -18,4 +18,9 @@
|
||||
android:title="@string/notifications_title"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
|
||||
|
||||
<Preference
|
||||
android:key="charging_light"
|
||||
android:icon="@drawable/ic_battery_almostfull"
|
||||
android:fragment="com.cherish.settings.fragments.BatteryLightSettings"
|
||||
android:title="@string/battery_light_settings" />
|
||||
</PreferenceScreen>
|
||||
|
||||
Reference in New Issue
Block a user