Cherish:Add network traffic type [2/2]

Change-Id: Ib14267df32525439ea67f9b7874a15965a4c5a7c
Signed-off-by: Josh Fox (XlxFoXxlX) <joshfox87@gmail.com>
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
Jon Haus
2018-11-16 01:36:25 +05:30
committed by Hưng Phan
parent 9051fbfa02
commit 78810eb503
4 changed files with 44 additions and 1 deletions

View File

@@ -250,4 +250,17 @@
<item>1</item>
<item>2</item>
</string-array>
<!-- Network traffic type -->
<string-array name="show_network_traffic_type_entries" translatable="false">
<item>@string/show_network_traffic_up</item>
<item>@string/show_network_traffic_down</item>
<item>@string/show_network_traffic_all</item>
</string-array>
<string-array name="show_network_traffic_type_values" translatable="false">
<item>1</item>
<item>2</item>
<item>0</item>
</string-array>
</resources>

View File

@@ -356,4 +356,8 @@
<string name="network_traffic_autohide_threshold_title">Net activity autohide threshold (KB/s)</string>
<string name="network_traffic_arrow">Show arrows</string>
<string name="network_traffic_arrow_summary">Show the network traffic indicator arrows</string>
<string name="network_traffic_type">Select net activity type</string>
<string name="show_network_traffic_up">Uplink</string>
<string name="show_network_traffic_down">Downlink</string>
<string name="show_network_traffic_all">Uplink and Downlink</string>
</resources>

View File

@@ -12,7 +12,7 @@
-->
<PreferenceScreen
android:title="@string/network_traffic"
android:title="@string/network_traffic_state_title"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
@@ -23,6 +23,14 @@
android:entries="@array/network_traffic_location_entries"
android:entryValues="@array/network_traffic_location_values"
android:persistent="false" />
<ListPreference
android:key="network_traffic_type"
android:title="@string/network_traffic_type"
android:entries="@array/show_network_traffic_type_entries"
android:entryValues="@array/show_network_traffic_type_values"
android:defaultValue="0"
android:persistent="false" />
<com.cherish.settings.preferences.CustomSeekBarPreference
android:key="network_traffic_autohide_threshold"