Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
848be8f8
Commit
848be8f8
authored
Dec 06, 2019
by
Viktor De Pasquale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed rtl for reveal animations
parent
c79b79b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
MotionRevealHelper.kt
...ain/java/com/topjohnwu/magisk/utils/MotionRevealHelper.kt
+3
-2
No files found.
app/src/main/java/com/topjohnwu/magisk/utils/MotionRevealHelper.kt
View file @
848be8f8
...
...
@@ -5,6 +5,7 @@ import android.animation.AnimatorSet
import
android.animation.ObjectAnimator
import
android.view.View
import
androidx.core.animation.addListener
import
androidx.core.text.layoutDirection
import
androidx.core.view.isInvisible
import
androidx.core.view.isVisible
import
androidx.core.view.marginBottom
...
...
@@ -61,9 +62,9 @@ object MotionRevealHelper {
it
.
interpolator
=
FastOutSlowInInterpolator
()
it
.
addListener
(
onStart
=
{
show
()
},
onEnd
=
{
if
(
revealInfo
.
radius
!=
0f
)
hide
()
})
// fixme rtl
val
rtlMod
=
if
(
currentLocale
.
layoutDirection
==
View
.
LAYOUT_DIRECTION_RTL
)
1f
else
-
1f
val
maxX
=
revealInfo
.
centerX
-
marginEnd
-
measuredWidth
/
2f
val
targetX
=
if
(
revealInfo
.
radius
==
0f
)
0f
else
-
maxX
val
targetX
=
if
(
revealInfo
.
radius
==
0f
)
0f
else
maxX
*
rtlMod
val
moveX
=
ObjectAnimator
.
ofFloat
(
this
,
View
.
TRANSLATION_X
,
targetX
)
val
maxY
=
revealInfo
.
centerY
-
marginBottom
-
measuredHeight
/
2f
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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