[Android] [PATCH] Force LTR to fix VerticalSeekBar background problem with RTL layout

Geoffrey Métais geoffrey at videolan.org
Thu Jun 15 22:47:50 CEST 2017


Does it work with LTR setting?

Le jeu. 15 juin 2017 à 22:31, habib kazemi <kazemihabib1996 at gmail.com> a
écrit :

> ---
>  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
>
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/android/attachments/20170615/c91783f2/attachment-0001.html>


More information about the Android mailing list