<div dir="ltr"><div>we don't need final boolean rtl = AndroidUtil.isJellyBeanMR1OrLater && TextUtils.getLayoutDirectionFromLocale(Locale.getDefault()) == View.LAYOUT_DIRECTION_RTL;<br><br></div>in onTouchEvent anymore because of `mIsRtl`<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 6, 2017 at 12:49 PM, Geoffrey Métais <span dir="ltr"><<a href="mailto:geoffrey@videolan.org" target="_blank">geoffrey@videolan.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Merged<br><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">Le ven. 2 juin 2017 à 20:56, habib kazemi <<a href="mailto:kazemihabib1996@gmail.com" target="_blank">kazemihabib1996@gmail.com</a>> a écrit :<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">Reverse seek touch direction and<br>
reverse the location BrightnessTouch and VolumeTouch<br>
---<br>
.../vlc/gui/video/<wbr>VideoPlayerActivity.java | 23 ++++++++++++++--------<br>
1 file changed, 15 insertions(+), 8 deletions(-)<br>
<br>
diff --git a/vlc-android/src/org/<wbr>videolan/vlc/gui/video/<wbr>VideoPlayerActivity.java b/vlc-android/src/org/<wbr>videolan/vlc/gui/video/<wbr>VideoPlayerActivity.java<br>
index 305deb04c..fc56ed7d8 100644<br>
--- a/vlc-android/src/org/<wbr>videolan/vlc/gui/video/<wbr>VideoPlayerActivity.java<br>
+++ b/vlc-android/src/org/<wbr>videolan/vlc/gui/video/<wbr>VideoPlayerActivity.java<br>
@@ -2081,6 +2081,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C<br>
<br>
@Override<br>
public boolean onTouchEvent(MotionEvent event) {<br>
+ final boolean rtl = AndroidUtil.<wbr>isJellyBeanMR1OrLater && TextUtils.<wbr>getLayoutDirectionFromLocale(<wbr>Locale.getDefault()) == View.LAYOUT_DIRECTION_RTL;<br>
if (mService == null)<br>
return false;<br>
if (mDetector == null) {<br>
@@ -2156,19 +2157,25 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C<br>
return false;<br>
mTouchY = event.getRawY();<br>
mTouchX = event.getRawX();<br>
- // Volume (Up or Down - Right side)<br>
- if ((mTouchControls & TOUCH_FLAG_AUDIO_VOLUME) != 0 && (int)mTouchX > (4 * mScreen.widthPixels / 7f)){<br>
- doVolumeTouch(y_changed);<br>
+ // (Up or Down - Right side) LTR: Volume RTL: Brightness<br>
+ if ((mTouchControls & (!rtl ? TOUCH_FLAG_AUDIO_VOLUME : TOUCH_FLAG_BRIGHTNESS)) != 0 && (int)mTouchX > (4 * mScreen.widthPixels / 7f)){<br>
+ if (!rtl)<br>
+ doVolumeTouch(y_changed);<br>
+ else<br>
+ doBrightnessTouch(y_changed);<br>
hideOverlay(true);<br>
}<br>
- // Brightness (Up or Down - Left side)<br>
- if ((mTouchControls & TOUCH_FLAG_BRIGHTNESS) != 0 && (int)mTouchX < (3 * mScreen.widthPixels / 7f)){<br>
- doBrightnessTouch(y_changed);<br>
+ // (Up or Down - Left side) LTR: Brightness RTL: Volume<br>
+ if ((mTouchControls & (!rtl ? TOUCH_FLAG_BRIGHTNESS : TOUCH_FLAG_AUDIO_VOLUME)) != 0 && (int)mTouchX < (3 * mScreen.widthPixels / 7f)){<br>
+ if(!rtl)<br>
+ doBrightnessTouch(y_changed);<br>
+ else<br>
+ doVolumeTouch(y_changed);<br>
hideOverlay(true);<br>
}<br>
} else {<br>
// Seek (Right or Left move)<br>
- doSeekTouch(Math.round(delta_<wbr>y), xgesturesize, false);<br>
+ doSeekTouch(Math.round(delta_<wbr>y), rtl ? -xgesturesize : xgesturesize , false);<br>
}<br>
} else {<br>
mTouchY = event.getRawY();<br>
@@ -2185,7 +2192,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C<br>
sendMouseEvent(MotionEvent.<wbr>ACTION_UP, 0, xTouch, yTouch);<br>
// Seek<br>
if (mTouchAction == TOUCH_SEEK)<br>
- doSeekTouch(Math.round(delta_<wbr>y), xgesturesize, true);<br>
+ doSeekTouch(Math.round(delta_<wbr>y), rtl ? -xgesturesize : xgesturesize , true);<br>
mTouchX = -1f;<br>
mTouchY = -1f;<br>
break;<br>
--<br>
2.12.2<br>
<br></div></div><span class="">
______________________________<wbr>_________________<br>
Android mailing list<br>
<a href="mailto:Android@videolan.org" target="_blank">Android@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/android" rel="noreferrer" target="_blank">https://mailman.videolan.org/<wbr>listinfo/android</a><br>
</span></blockquote></div></div>
</blockquote></div><br></div>