Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-Android
Commits
b8184465
Commit
b8184465
authored
Dec 30, 2020
by
Habib Kazemi
Committed by
Nicolas Pomepuy
Jan 05, 2021
Browse files
Fix the RTL problem of SwipeToUnlockView
Fixes
#1578
problem number 6
parent
ee389e91
Changes
1
Hide whitespace changes
Inline
Side-by-side
application/vlc-android/src/org/videolan/vlc/gui/view/SwipeToUnlockView.kt
View file @
b8184465
...
...
@@ -31,6 +31,7 @@ import android.text.SpannableString
import
android.text.Spanned
import
android.text.style.MaskFilterSpan
import
android.util.AttributeSet
import
android.util.LayoutDirection
import
android.util.Log
import
android.view.KeyEvent
import
android.view.LayoutInflater
...
...
@@ -101,7 +102,10 @@ class SwipeToUnlockView : ConstraintLayout {
override
fun
onTouchEvent
(
event
:
MotionEvent
?):
Boolean
{
if
(
unlocking
)
return
super
.
onTouchEvent
(
event
)
event
?.
let
{
event
->
val
currentX
=
event
.
x
.
toInt
().
coerceAtLeast
(
extremum
).
coerceAtMost
(
width
-
extremum
)
val
currentX
=
event
.
x
.
toInt
().
coerceAtLeast
(
extremum
).
coerceAtMost
(
width
-
extremum
).
run
{
if
(
layoutDirection
==
LayoutDirection
.
RTL
)
width
-
this
else
this
}
when
(
event
.
action
)
{
MotionEvent
.
ACTION_DOWN
->
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment