Traffic: Change to if/else from switch for updateTrafficLocation()

* Fixing Expanded header option jumping from Disabled state.
 * Also, update font size options

Signed-off-by: ShubhamB <shubhamprince111@gmail.com>
Change-Id: I9088a45e30a2cdd4f0835a5daaf23b471d34e738
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
sb6596
2021-10-25 08:39:16 +00:00
committed by Hưng Phan
parent 7b3758b51c
commit 8983c890d0
2 changed files with 52 additions and 58 deletions

View File

@@ -16,40 +16,41 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<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" />
<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" />
<ListPreference
android:key="network_traffic_view_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="" />
<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.SystemSettingSwitchPreference
android:key="network_traffic_arrow"
android:title="@string/network_traffic_arrow"
android:summary="@string/network_traffic_arrow_summary"
android:defaultValue="true" />
android:key="network_traffic_arrow"
android:title="@string/network_traffic_arrow"
android:summary="@string/network_traffic_arrow_summary"
android:defaultValue="false" />
<com.cherish.settings.preferences.CustomSeekBarPreference
android:key="network_traffic_font_size"
android:title="@string/nettraf_font_size"
android:max="60"
settings:min="21"
settings:defaultValue="30"
settings:units="dp" />
<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:defaultValue="1"
settings:units="" />
<com.cherish.settings.preferences.CustomSeekBarPreference
android:key="network_traffic_font_size"
android:title="@string/nettraf_font_size"
android:max="46"
android:min="26"
settings:defaultValue="36"
settings:units="dp" />
</PreferenceScreen>