[Android] [PATCH] Force LTR to fix VerticalSeekBar background problem with RTL layout
habib kazemi
kazemihabib1996 at gmail.com
Thu Jun 15 22:30:12 CEST 2017
---
vlc-android/src/org/videolan/vlc/gui/view/EqualizerBar.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/gui/view/EqualizerBar.java b/vlc-android/src/org/videolan/vlc/gui/view/EqualizerBar.java
index 0ec66a66c..9247e1654 100644
--- a/vlc-android/src/org/videolan/vlc/gui/view/EqualizerBar.java
+++ b/vlc-android/src/org/videolan/vlc/gui/view/EqualizerBar.java
@@ -21,6 +21,7 @@
package org.videolan.vlc.gui.view;
import android.content.Context;
+import android.os.Build;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
@@ -55,6 +56,10 @@ public class EqualizerBar extends LinearLayout {
LayoutInflater.from(context).inflate(R.layout.equalizer_bar, this, true);
mSeek = (VerticalSeekBar) findViewById(R.id.equalizer_seek);
+ //Force LTR to fix VerticalSeekBar background problem with RTL layout
+ if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1){
+ mSeek.setLayoutDirection(LAYOUT_DIRECTION_LTR);
+ }
mSeek.setMax(2 * RANGE);
mSeek.setProgress(RANGE);
mSeek.setOnSeekBarChangeListener(mSeekListener);
--
2.13.0
More information about the Android
mailing list