<div dir="ltr">I misunderstood , no difference between size of volume touch width and brightness touch width there is just a 1/7 space in center of screen that none of them works.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 2, 2017 at 9:20 PM, Habib Kazemi <span dir="ltr"><<a href="mailto:kazemihabib1996@gmail.com" target="_blank">kazemihabib1996@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I made a mistake here , there are "TOUCH_FLAG_BRIGHTNESS" and<br>
"TOUCH_FLAG_BRIGHTNESS" for disabling and enabling volume touch and<br>
brightness touch and with this patch it disables reversely.<br>
and also in default mode (LTR) the volume touch width is larger (4/7<br>
of screen) and brightness touch is 3/7 of width.<br>
<br>
but the more import thing here is that I checked other apps and<br>
websites like Youtube and <a href="http://aparat.com" rel="noreferrer" target="_blank">aparat.com</a>(persian video sharing website and<br>
app) and they didn't change the direction of seekbar in rtl mode and<br>
I was thinking maybe we should keep it as a standard and not change<br>
direction.<br>
<span class="im HOEnZb"><br>
On Fri, Jun 2, 2017 at 7:56 PM, Geoffrey Métais <<a href="mailto:geoffrey@videolan.org">geoffrey@videolan.org</a>> wrote:<br>
</span><div class="HOEnZb"><div class="h5">> Looks good to me.<br>
><br>
> Le ven. 2 juin 2017 à 17:20, habib kazemi <<a href="mailto:kazemihabib1996@gmail.com">kazemihabib1996@gmail.com</a>> a<br>
> écrit :<br>
>><br>
>> ---<br>
>> .../videolan/vlc/gui/video/<wbr>VideoPlayerActivity.java | 19<br>
>> +++++++++++++------<br>
>> 1 file changed, 13 insertions(+), 6 deletions(-)<br>
>><br>
>> diff --git<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>
>> index 305deb04c..a01aad539 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<br>
>> AppCompatActivity implements IVLCVout.C<br>
>><br>
>> @Override<br>
>> public boolean onTouchEvent(MotionEvent event) {<br>
>> + final boolean rtl = AndroidUtil.<wbr>isJellyBeanMR1OrLater &&<br>
>> TextUtils.<wbr>getLayoutDirectionFromLocale(<wbr>Locale.getDefault()) ==<br>
>> View.LAYOUT_DIRECTION_RTL;<br>
>> if (mService == null)<br>
>> return false;<br>
>> if (mDetector == null) {<br>
>> @@ -2156,19 +2157,25 @@ public class VideoPlayerActivity extends<br>
>> AppCompatActivity implements IVLCVout.C<br>
>> return false;<br>
>> mTouchY = event.getRawY();<br>
>> mTouchX = event.getRawX();<br>
>> - // Volume (Up or Down - Right side)<br>
>> + // (Up or Down - Right side) LTR: Volume RTL:<br>
>> Brightness<br>
>> if ((mTouchControls & TOUCH_FLAG_AUDIO_VOLUME) !=<br>
>> 0 && (int)mTouchX > (4 * mScreen.widthPixels / 7f)){<br>
>> - doVolumeTouch(y_changed);<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>
>> + // (Up or Down - Left side) LTR: Brightness RTL:<br>
>> Volume<br>
>> if ((mTouchControls & TOUCH_FLAG_BRIGHTNESS) != 0<br>
>> && (int)mTouchX < (3 * mScreen.widthPixels / 7f)){<br>
>> - doBrightnessTouch(y_changed);<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,<br>
>> false);<br>
>> + doSeekTouch(Math.round(delta_<wbr>y), rtl ?<br>
>> -xgesturesize : xgesturesize , false);<br>
>> }<br>
>> } else {<br>
>> mTouchY = event.getRawY();<br>
>> @@ -2185,7 +2192,7 @@ public class VideoPlayerActivity extends<br>
>> 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<br>
>> : xgesturesize , true);<br>
>> mTouchX = -1f;<br>
>> mTouchY = -1f;<br>
>> break;<br>
>> --<br>
>> 2.12.2<br>
>><br>
>> ______________________________<wbr>_________________<br>
>> Android mailing list<br>
>> <a href="mailto:Android@videolan.org">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>
</div></div></blockquote></div><br></div>