[Android] Switch button for Equalizer

Geoffrey Métais git at videolan.org
Wed Mar 11 20:10:20 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Mar 11 20:09:49 2015 +0100| [77c828d76f7f2e357c4e3118e8963b437100101e] | committer: Geoffrey Métais

Switch button for Equalizer

Toggle button was misleading

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=77c828d76f7f2e357c4e3118e8963b437100101e
---

 vlc-android/res/layout-land/equalizer.xml                         |    2 +-
 vlc-android/res/layout/equalizer.xml                              |    2 +-
 vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java |    5 +++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/vlc-android/res/layout-land/equalizer.xml b/vlc-android/res/layout-land/equalizer.xml
index 147d9f3..f0b8f2e 100644
--- a/vlc-android/res/layout-land/equalizer.xml
+++ b/vlc-android/res/layout-land/equalizer.xml
@@ -9,7 +9,7 @@
         android:layout_height="wrap_content"
         android:orientation="horizontal" >
 
-        <ToggleButton
+        <android.support.v7.widget.SwitchCompat
             android:id="@+id/equalizer_button"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
diff --git a/vlc-android/res/layout/equalizer.xml b/vlc-android/res/layout/equalizer.xml
index dd18dc2..2e622ce 100644
--- a/vlc-android/res/layout/equalizer.xml
+++ b/vlc-android/res/layout/equalizer.xml
@@ -9,7 +9,7 @@
         android:layout_height="wrap_content"
         android:orientation="horizontal" >
 
-        <ToggleButton
+        <android.support.v7.widget.SwitchCompat
             android:id="@+id/equalizer_button"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java
index 8cb3df2..dd6c240 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java
@@ -24,6 +24,7 @@ import android.os.Bundle;
 import android.preference.PreferenceManager;
 import android.support.v4.app.Fragment;
 import android.support.v7.app.ActionBarActivity;
+import android.support.v7.widget.SwitchCompat;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -50,7 +51,7 @@ import org.videolan.vlc.widget.EqualizerBar;
 public class EqualizerFragment extends Fragment {
 
     public final static String TAG = "VLC/EqualizerFragment";
-    private ToggleButton button;
+    private SwitchCompat button;
     private Spinner equalizer_presets;
     private SeekBar preamp;
     private LinearLayout bands_layout;
@@ -73,7 +74,7 @@ public class EqualizerFragment extends Fragment {
     }
 
     private void saveViewChildren(View v) {
-        button = (ToggleButton) v.findViewById(R.id.equalizer_button);
+        button = (SwitchCompat) v.findViewById(R.id.equalizer_button);
         equalizer_presets = (Spinner) v.findViewById(R.id.equalizer_presets);
         preamp = (SeekBar) v.findViewById(R.id.equalizer_preamp);
         bands_layout = (LinearLayout) v.findViewById(R.id.equalizer_bands);



More information about the Android mailing list