Cherish:Comeback "[SQUASHED] Custom Carrier Label & Carrier Label Placement [1/2]"

This reverts commit a40ab20879.

Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
Hưng Phan
2021-08-23 22:57:30 +07:00
parent 8dfadcc4f7
commit 59293d7ff4
5 changed files with 272 additions and 0 deletions

View File

@@ -650,6 +650,21 @@
<item>2</item>
</string-array>
<!-- Carrier Label -->
<string-array name="carrier_label_entries" translatable="false">
<item>@string/show_carrier_disabled</item>
<item>@string/show_carrier_keyguard</item>
<item>@string/show_carrier_statusbar</item>
<item>@string/show_carrier_enabled</item>
</string-array>
<string-array name="carrier_label_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
</string-array>
<!-- Brightness sliders styles -->
<string-array name="brightness_slider_style_selector_entries" translatable="false">
<item>@string/brightness_slider_style_default</item>

View File

@@ -1369,4 +1369,21 @@
<string name="gaming_mode_danmaku_speed_vertical_title">Danmaku speed (vertical)</string>
<string name="gaming_mode_danmaku_blacklist">Blacklist</string>
<string name="gaming_mode_menu_opacity_title">Menu opacity level</string>
<!-- Custom carrier label and position -->
<string name="carrier_label_category_title">CarrierLabel Settings</string>
<string name="carrier_label_category_summary">Customize statusbar carrierlabel</string>
<string name="carrier_label_settings_title">Carrier Label</string>
<string name="carrier_label_settings_summary">Customize the carrier label</string>
<string name="custom_carrier_label_title">Custom carrier label</string>
<string name="custom_carrier_label_explain">Please enter a new label. Leave blank to revert to stock label.</string>
<string name="custom_carrier_label_notset">Custom label currently not set</string>
<string name="show_carrier_title">Carrier label</string>
<string name="show_carrier_disabled">Disabled</string>
<string name="show_carrier_keyguard">Lockscreen only</string>
<string name="show_carrier_statusbar">Statusbar only</string>
<string name="show_carrier_enabled">Lockscreen &amp; statusbar</string>
<string name="status_bar_carrier_color">Carrier label color</string>
<string name="status_bar_carrier_size">Carrier label size</string>
<string name="status_bar_carrier_font_style_title">Carrier Label Font</string>
</resources>

View File

@@ -82,6 +82,13 @@
android:icon="@drawable/ic_battery_bar"
android:summary="@string/battery_bar_summary"
android:fragment="com.cherish.settings.fragments.BatteryBarSettings" />
<Preference
android:key="carrier_label"
android:icon="@drawable/ic_carrierlabel"
android:title="@string/carrier_label_settings_title"
android:summary="@string/carrier_label_settings_summary"
android:fragment="com.cherish.settings.fragments.CustomCarrierLabel" />
<Preference
android:key="cutout_settings"

View File

@@ -0,0 +1,45 @@
<?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/carrier_label_settings_title"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<com.cherish.settings.preferences.SystemSettingListPreference
android:key="status_bar_show_carrier"
android:title="@string/show_carrier_title"
android:dialogTitle="@string/show_carrier_title"
android:entries="@array/carrier_label_entries"
android:entryValues="@array/carrier_label_values"
android:summary="%s"
android:defaultValue="0" />
<PreferenceScreen
android:key="custom_carrier_label"
android:title="@string/custom_carrier_label_title" />
<net.margaritov.preference.colorpicker.ColorPickerPreference
android:key="status_bar_carrier_color"
android:title="@string/status_bar_carrier_color"
android:defaultValue="0xffffffff" />
<com.cherish.settings.preferences.CustomSeekBarPreference
android:key="status_bar_carrier_font_size"
android:title="@string/status_bar_carrier_size"
android:max="23"
settings:min="8"
settings:defaultValue="14"
settings:units="dp" />
</PreferenceScreen>