Merge "Skip cancel of physics animators if not needed" into tm-qpr-dev
This commit is contained in:
@@ -829,8 +829,12 @@ class PhysicsAnimator<T> private constructor (target: T) {
|
|||||||
|
|
||||||
/** Cancels all in progress animations on all properties. */
|
/** Cancels all in progress animations on all properties. */
|
||||||
fun cancel() {
|
fun cancel() {
|
||||||
cancelAction(flingAnimations.keys)
|
if (flingAnimations.size > 0) {
|
||||||
cancelAction(springAnimations.keys)
|
cancelAction(flingAnimations.keys)
|
||||||
|
}
|
||||||
|
if (springAnimations.size > 0) {
|
||||||
|
cancelAction(springAnimations.keys)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Cancels in progress animations on the provided properties only. */
|
/** Cancels in progress animations on the provided properties only. */
|
||||||
|
|||||||
Reference in New Issue
Block a user