[Android] [PATCH] UI/UX: Replace checkboxes to on/off switches

Alexey Rodionov fluorescent.hallucinogen at gmail.com
Fri Jan 8 15:22:06 CET 2016


>From 8fcc72edfa8fbca1a1e755aa7477edd58e232b98 Mon Sep 17 00:00:00 2001
From: Alexey Rodionov <fluorescent.hallucinogen at gmail.com>
Date: Fri, 8 Jan 2016 17:01:42 +0300
Subject: [PATCH] UI/UX: Replace checkboxes to on/off switches

---
 vlc-android/res/xml/preferences.xml      |  4 ++--
 vlc-android/res/xml/preferences_adv.xml  |  2 +-
 vlc-android/res/xml/preferences_dev.xml  |  2 +-
 vlc-android/res/xml/preferences_perf.xml |  4 ++--
 vlc-android/res/xml/preferences_ui.xml   | 16 ++++++++--------
 5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/vlc-android/res/xml/preferences.xml
b/vlc-android/res/xml/preferences.xml
index fb2a06d..f305b69 100644
--- a/vlc-android/res/xml/preferences.xml
+++ b/vlc-android/res/xml/preferences.xml
@@ -15,13 +15,13 @@
         android:summary="@string/hardware_acceleration_summary"
         android:title="@string/hardware_acceleration" />

-    <CheckBoxPreference
+    <android.support.v7.preference.SwitchPreferenceCompat
         android:defaultValue="true"
         android:key="playback_history"
         android:summary="@string/playback_history_summary"
         android:title="@string/playback_history_title" />

-    <CheckBoxPreference
+    <android.support.v7.preference.SwitchPreferenceCompat
         android:defaultValue="false"
         android:key="video_background"
         android:summary="@string/play_as_audio_background_summary"
diff --git a/vlc-android/res/xml/preferences_adv.xml
b/vlc-android/res/xml/preferences_adv.xml
index 250e459..7c54ab9 100644
--- a/vlc-android/res/xml/preferences_adv.xml
+++ b/vlc-android/res/xml/preferences_adv.xml
@@ -11,7 +11,7 @@
     <!--android:summary="@string/vout_summary"-->
     <!--android:title="@string/vout" />-->

-    <CheckBoxPreference
+    <android.support.v7.preference.SwitchPreferenceCompat
         android:defaultValue="true"
         android:key="auto_rescan"
         android:title="@string/auto_rescan"
diff --git a/vlc-android/res/xml/preferences_dev.xml
b/vlc-android/res/xml/preferences_dev.xml
index 2750caa..f74337c 100644
--- a/vlc-android/res/xml/preferences_dev.xml
+++ b/vlc-android/res/xml/preferences_dev.xml
@@ -9,7 +9,7 @@
         android:key="dev_hardware_decoder"
         android:summary="@string/dev_hardware_decoder_summary"
         android:title="@string/dev_hardware_decoder" />
-    <CheckBoxPreference
+    <android.support.v7.preference.SwitchPreferenceCompat
         android:defaultValue="true"
         android:key="enable_verbose_mode"
         android:summary="@string/enable_verbose_mode_summary"
diff --git a/vlc-android/res/xml/preferences_perf.xml
b/vlc-android/res/xml/preferences_perf.xml
index 921f743..644d8ae 100644
--- a/vlc-android/res/xml/preferences_perf.xml
+++ b/vlc-android/res/xml/preferences_perf.xml
@@ -17,12 +17,12 @@
         android:summary="@string/deblocking_summary"
         android:title="@string/deblocking" />

-    <CheckBoxPreference
+    <android.support.v7.preference.SwitchPreferenceCompat
         android:defaultValue="false"
         android:key="enable_frame_skip"
         android:summary="@string/enable_frame_skip_summary"
         android:title="@string/enable_frame_skip" />
-    <CheckBoxPreference
+    <android.support.v7.preference.SwitchPreferenceCompat
         android:defaultValue="@bool/time_stretching_default"
         android:key="enable_time_stretching_audio"
         android:summary="@string/enable_time_stretching_audio_summary"
diff --git a/vlc-android/res/xml/preferences_ui.xml
b/vlc-android/res/xml/preferences_ui.xml
index 75b6905..a2324f9 100644
--- a/vlc-android/res/xml/preferences_ui.xml
+++ b/vlc-android/res/xml/preferences_ui.xml
@@ -6,44 +6,44 @@
     <PreferenceCategory
android:title="@string/interface_secondary_display_category" >
         <Preference
android:summary="@string/interface_secondary_display_category_summary"
/>

-        <CheckBoxPreference
+        <android.support.v7.preference.SwitchPreferenceCompat
             android:defaultValue="false"
             android:key="enable_clone_mode"
             android:summary="@string/enable_clone_mode_summary"
             android:title="@string/enable_clone_mode" />
     </PreferenceCategory>
     <PreferenceCategory android:title="@string/interface_other_category" >
-        <CheckBoxPreference
+        <android.support.v7.preference.SwitchPreferenceCompat
             android:defaultValue="false"
             android:key="save_brightness"
             android:summary="@string/save_brightness_summary"
             android:title="@string/save_brightness_title" />
-        <CheckBoxPreference
+        <android.support.v7.preference.SwitchPreferenceCompat
             android:defaultValue="false"
             android:key="dialog_confirm_resume"
             android:summary="@string/confirm_resume_summary"
             android:title="@string/confirm_resume_title" />
-        <CheckBoxPreference
+        <android.support.v7.preference.SwitchPreferenceCompat
             android:defaultValue="false"
             android:key="enable_seek_buttons"
             android:summary="@string/enable_seek_buttons_summary"
             android:title="@string/enable_seek_buttons" />
-        <CheckBoxPreference
+        <android.support.v7.preference.SwitchPreferenceCompat
             android:defaultValue="false"
             android:key="force_list_portrait"
             android:summary="@string/force_list_portrait_summary"
             android:title="@string/force_list_portrait" />
-        <CheckBoxPreference
+        <android.support.v7.preference.SwitchPreferenceCompat
             android:defaultValue="true"
             android:key="enable_brightness_gesture"
             android:summary="@string/enable_brightness_gesture_summary"
             android:title="@string/enable_brightness_gesture" />
-        <CheckBoxPreference
+        <android.support.v7.preference.SwitchPreferenceCompat
             android:defaultValue="true"
             android:key="enable_headset_detection"
             android:summary="@string/enable_headset_detection_summary"
             android:title="@string/enable_headset_detection" />
-        <CheckBoxPreference
+        <android.support.v7.preference.SwitchPreferenceCompat
             android:defaultValue="false"
             android:key="enable_steal_remote_control"
             android:summary="@string/enable_steal_remote_control_summary"


More information about the Android mailing list