mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 09:17:44 +00:00
Fix animation glitch
This commit is contained in:
parent
e61c3288fa
commit
bf24b84840
@ -169,10 +169,10 @@ class VisibleMessageView : LinearLayout {
|
||||
swipeToReplyIconRect.bottom = height - bottomVOffset
|
||||
swipeToReplyIcon.bounds = swipeToReplyIconRect
|
||||
swipeToReplyIcon.alpha = (255.0f * (min(abs(translationX), threshold) / threshold)).roundToInt()
|
||||
swipeToReplyIcon.draw(canvas)
|
||||
} else {
|
||||
swipeToReplyIcon.alpha = 0
|
||||
}
|
||||
swipeToReplyIcon.draw(canvas)
|
||||
super.onDraw(canvas)
|
||||
}
|
||||
|
||||
@ -234,6 +234,7 @@ class VisibleMessageView : LinearLayout {
|
||||
animate()
|
||||
.translationX(0.0f)
|
||||
.setDuration(150)
|
||||
.setUpdateListener { postInvalidate() } // Ensure onDraw(canvas:) is called
|
||||
.start()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user