mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 17:27:45 +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
|
swipeToReplyIconRect.bottom = height - bottomVOffset
|
||||||
swipeToReplyIcon.bounds = swipeToReplyIconRect
|
swipeToReplyIcon.bounds = swipeToReplyIconRect
|
||||||
swipeToReplyIcon.alpha = (255.0f * (min(abs(translationX), threshold) / threshold)).roundToInt()
|
swipeToReplyIcon.alpha = (255.0f * (min(abs(translationX), threshold) / threshold)).roundToInt()
|
||||||
swipeToReplyIcon.draw(canvas)
|
|
||||||
} else {
|
} else {
|
||||||
swipeToReplyIcon.alpha = 0
|
swipeToReplyIcon.alpha = 0
|
||||||
}
|
}
|
||||||
|
swipeToReplyIcon.draw(canvas)
|
||||||
super.onDraw(canvas)
|
super.onDraw(canvas)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -234,6 +234,7 @@ class VisibleMessageView : LinearLayout {
|
|||||||
animate()
|
animate()
|
||||||
.translationX(0.0f)
|
.translationX(0.0f)
|
||||||
.setDuration(150)
|
.setDuration(150)
|
||||||
|
.setUpdateListener { postInvalidate() } // Ensure onDraw(canvas:) is called
|
||||||
.start()
|
.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user