<div dir="ltr">Merged<br><br><div class="gmail_quote"><div dir="ltr">Le ven. 2 juin 2017 à 20:56, habib kazemi <<a href="mailto:kazemihabib1996@gmail.com">kazemihabib1996@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Reverse seek touch direction and<br>
reverse the location BrightnessTouch and VolumeTouch<br>
---<br>
.../vlc/gui/video/VideoPlayerActivity.java | 23 ++++++++++++++--------<br>
1 file changed, 15 insertions(+), 8 deletions(-)<br>
<br>
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java<br>
index 305deb04c..fc56ed7d8 100644<br>
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java<br>
+++ b/vlc-android/src/org/videolan/vlc/gui/video/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.isJellyBeanMR1OrLater && TextUtils.getLayoutDirectionFromLocale(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_y), xgesturesize, false);<br>
+ doSeekTouch(Math.round(delta_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.ACTION_UP, 0, xTouch, yTouch);<br>
// Seek<br>
if (mTouchAction == TOUCH_SEEK)<br>
- doSeekTouch(Math.round(delta_y), xgesturesize, true);<br>
+ doSeekTouch(Math.round(delta_y), rtl ? -xgesturesize : xgesturesize , true);<br>
mTouchX = -1f;<br>
mTouchY = -1f;<br>
break;<br>
--<br>
2.12.2<br>
<br>
_______________________________________________<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/listinfo/android</a><br>
</blockquote></div></div>