Cherish: Network Traffic [2/2]
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
@@ -498,5 +498,11 @@
|
||||
<string name="status_bar_battery_style_circle">Circle</string>
|
||||
<string name="status_bar_battery_style_dotted_circle">Dotted сircle</string>
|
||||
<string name="status_bar_battery_style_text">Text</string>
|
||||
|
||||
<!-- Network Traffic -->
|
||||
<string name="traffic_title">Traffic indicators</string>
|
||||
<string name="traffic_summary">Customize the traffic indicators</string>
|
||||
<string name="network_traffic_state_title">Show network traffic</string>
|
||||
<string name="network_traffic_autohide_threshold_title">Auto-hide threshold</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -35,6 +35,12 @@
|
||||
android:summary="@string/status_bar_clock_date_summary"
|
||||
android:fragment="com.cherish.settings.fragments.ClockDateSettings" />
|
||||
|
||||
<Preference
|
||||
android:key="traffic"
|
||||
android:fragment="com.cherish.settings.fragments.Traffic"
|
||||
android:title="@string/traffic_title"
|
||||
android:summary="@string/traffic_summary" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="data_disabled_icon"
|
||||
android:title="@string/data_disabled_icon_title"
|
||||
|
||||
35
res/xml/cherish_settings_traffic.xml
Normal file
35
res/xml/cherish_settings_traffic.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2020-2022 The CherishOS 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"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:title="@string/traffic_title">
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="network_traffic_state"
|
||||
android:title="@string/network_traffic_state_title"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.CustomSeekBarPreference
|
||||
android:key="network_traffic_autohide_threshold"
|
||||
android:title="@string/network_traffic_autohide_threshold_title"
|
||||
android:max="10"
|
||||
settings:min="0"
|
||||
settings:units="KB/s"
|
||||
android:defaultValue="0" />
|
||||
|
||||
</PreferenceScreen>
|
||||
Reference in New Issue
Block a user