This repository has been archived on 2025-09-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
android_packages_apps_Cherish/res/xml/cherish_settings_traffic.xml
spezi77 4c5cdef705 NetworkTraffic: Cleanup and align to the new implementation.
* Also port "Show single traffic and allow custom font size [2/2]"
* Thanks to neobuddy for showing how the code can be slimmed down:
  https://github.com/crdroidandroid/android_packages_apps_crDroidSettings/commit/cab6d64

Signed-off-by: spezi77 <spezi7713@gmx.net>
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
2022-03-17 00:34:34 +07:00

81 lines
3.6 KiB
XML

<?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
android:title="@string/traffic_title"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<com.cherish.settings.preferences.SystemSettingListPreference
android:key="network_traffic_location"
android:title="@string/network_traffic_location_title"
android:summary="%s"
android:entries="@array/network_traffic_location_entries"
android:entryValues="@array/network_traffic_location_values"
android:defaultValue="0" />
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="network_traffic_autohide"
android:title="@string/network_traffic_autohide"
android:summary="@string/network_traffic_autohide_summary"
android:defaultValue="true" />
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
android:key="network_traffic_autohide_threshold"
android:title="@string/network_traffic_autohide_threshold_title"
android:defaultValue="0"
android:max="10000"
settings:min="0"
settings:units="@string/network_traffic_autohide_kilobytes"
settings:interval="10"
android:dependency="network_traffic_autohide" />
<com.cherish.settings.preferences.SystemSettingListPreference
android:key="network_traffic_mode"
android:title="@string/network_traffic_mode_title"
android:entries="@array/network_traffic_mode_entries"
android:entryValues="@array/network_traffic_mode_values"
android:summary="%s"
android:defaultValue="0" />
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
android:key="network_traffic_refresh_interval"
android:title="@string/network_traffic_refresh_interval_title"
android:summary="@string/network_traffic_refresh_interval_summary"
android:defaultValue="2"
android:max="10"
settings:min="1"
settings:units="@string/unit_seconds" />
<com.cherish.settings.preferences.SystemSettingListPreference
android:key="network_traffic_units"
android:title="@string/network_traffic_units_title"
android:entries="@array/network_traffic_units_entries"
android:entryValues="@array/network_traffic_units_values"
android:summary="%s"
android:defaultValue="1" />
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="network_traffic_hidearrow"
android:title="@string/network_traffic_hidearrow"
android:summary="@string/network_traffic_hidearrow_summary" />
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
android:key="network_traffic_font_size"
android:title="@string/network_traffic_font_size"
android:max="24"
settings:min="14"
settings:defaultValue="18"
settings:units="dp" />
</PreferenceScreen>