Cherish:Network traffic location [2/2]

spezi77 edits:
-Adapted to our codebase
-Indicator arrows: Reverse logic of the toggle. Following a373316b1d

Change-Id: I6e7ebce7738c1dcc1b8b359b58f5d90aa8c07ecd
Signed-off-by: spezi77 <spezi7713@gmx.net>
Signed-off-by: Arghya Chanda <arghyac35@gmail.com>
Signed-off-by: SagarMakhar <sagarmakhar@gmail.com>
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
Anushek Prasal
2018-12-27 02:54:40 +05:30
committed by Hưng Phan
parent f5784f962b
commit 225e2cdeef
4 changed files with 82 additions and 31 deletions

View File

@@ -141,4 +141,16 @@
<item>1</item>
</string-array>
<!-- Network traffic location -->
<string-array name="network_traffic_location_entries">
<item>@string/traffic_disabled</item>
<item>@string/traffic_statusbar</item>
<item>@string/traffic_expanded_statusbar</item>
</string-array>
<string-array name="network_traffic_location_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
</resources>

View File

@@ -270,8 +270,11 @@
<!-- Statusbar net monitor -->
<string name="traffic_title">Traffic Indicators</string>
<string name="network_traffic_state_title">Network traffic</string>
<string name="network_traffic_state_summary">Show net activity in statusbar</string>
<string name="network_traffic_location">Show net activity</string>
<string name="traffic_disabled">Disabled</string>
<string name="traffic_statusbar">Statusbar</string>
<string name="traffic_expanded_statusbar">Expanded Statusbar</string>
<string name="network_traffic_autohide_threshold_title">Net activity autohide threshold (KB/s)</string>
<string name="network_traffic_hidearrow">Hide arrows</string>
<string name="network_traffic_hidearrow_summary">Hide the network traffic indicator arrows</string>
<string name="network_traffic_arrow">Show arrows</string>
<string name="network_traffic_arrow_summary">Show the network traffic indicator arrows</string>
</resources>

View File

@@ -16,23 +16,25 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="network_traffic_state"
android:title="@string/network_traffic_state_title"
android:defaultValue="false" />
<ListPreference
android:key="network_traffic_location"
android:title="@string/network_traffic_location"
android:summary="%s"
android:entries="@array/network_traffic_location_entries"
android:entryValues="@array/network_traffic_location_values"
android:persistent="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="" />
android:key="network_traffic_autohide_threshold"
android:title="@string/network_traffic_autohide_threshold_title"
android:max="10"
settings:min="0"
settings:units="" />
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="network_traffic_hidearrow"
android:title="@string/network_traffic_hidearrow"
android:summary="@string/network_traffic_hidearrow_summary"
android:dependency="network_traffic_state"
android:defaultValue="false" />
android:key="network_traffic_arrow"
android:title="@string/network_traffic_arrow"
android:summary="@string/network_traffic_arrow_summary"
android:defaultValue="true" />
</PreferenceScreen>