Implement battery percent styles (2/2)

Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
Danesh M
2015-10-28 14:07:03 -07:00
committed by Hưng Phan
parent 4987963079
commit 2ff574b8c7
4 changed files with 120 additions and 0 deletions

View File

@@ -383,4 +383,15 @@
<item>7</item>
<item>5</item>
</string-array>
<string-array name="status_bar_battery_percentage_entries" translatable="false">
<item>@string/status_bar_battery_percentage_default</item>
<item>@string/status_bar_battery_percentage_text_inside</item>
<item>@string/status_bar_battery_percentage_text_next</item>
</string-array>
<string-array name="status_bar_battery_percentage_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
</resources>

View File

@@ -484,5 +484,12 @@
<!-- Gaming mode -->
<string name="gaming_mode_title">Game space</string>
<string name="gaming_mode_summary">Extra features for immersive gaming experience</string>
<!-- Battery percentage -->
<string name="battery_style_category_title">Battery icon</string>
<string name="status_bar_battery_percentage_title">Battery percentage</string>
<string name="status_bar_battery_percentage_default">Hidden</string>
<string name="status_bar_battery_percentage_text_next">Next to the icon</string>
<string name="status_bar_battery_percentage_text_inside">Inside the icon</string>
</resources>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 Nitrogen Project
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/battery_style_category_title"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<ListPreference
android:key="status_bar_show_battery_percent"
android:title="@string/status_bar_battery_percentage_title"
android:dialogTitle="@string/status_bar_battery_percentage_title"
android:entries="@array/status_bar_battery_percentage_entries"
android:entryValues="@array/status_bar_battery_percentage_values" />
</PreferenceScreen>