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: 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 9886cd4864
commit c22803f129
4 changed files with 77 additions and 26 deletions

View File

@@ -238,4 +238,16 @@
<item>2</item>
<item>3</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

@@ -349,8 +349,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,10 +16,13 @@
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"
@@ -29,10 +32,9 @@
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>