[Android] Equalizer: fix a layout glitch in portrait mode

Adrien Maglo git at videolan.org
Thu Feb 6 19:36:25 CET 2014


vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Thu Feb  6 19:36:18 2014 +0100| [b7a229358896ded3ed6f84b66b8e82d90e943602] | committer: Adrien Maglo

Equalizer: fix a layout glitch in portrait mode

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

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

diff --git a/vlc-android/res/layout-land/equalizer.xml b/vlc-android/res/layout-land/equalizer.xml
index 0deb913..95f20ea 100644
--- a/vlc-android/res/layout-land/equalizer.xml
+++ b/vlc-android/res/layout-land/equalizer.xml
@@ -43,7 +43,6 @@
             android:id="@+id/equalizer_bands"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
-            android:layout_gravity="center_horizontal"
             android:orientation="horizontal" />
     </HorizontalScrollView>
 
diff --git a/vlc-android/res/layout/equalizer.xml b/vlc-android/res/layout/equalizer.xml
index 07cac2f..fd06a7d 100644
--- a/vlc-android/res/layout/equalizer.xml
+++ b/vlc-android/res/layout/equalizer.xml
@@ -41,7 +41,6 @@
             android:id="@+id/equalizer_bands"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
-            android:layout_gravity="center_horizontal"
             android:orientation="horizontal" />
     </HorizontalScrollView>
 
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 3757247..80f4f94 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.java
@@ -93,13 +93,16 @@ public class EqualizerFragment extends SherlockFragment {
         rootView.addView(v);
         saveViewChildren(v);
 
-        onResume();
+        fillViews();
     }
 
     @Override
     public void onResume() {
         super.onResume();
+        fillViews();
+    }
 
+    private void fillViews() {
         SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(VLCApplication.getAppContext());
         float[] bands = null;
         String[] presets = null;



More information about the Android mailing list