Merge "Prevent conflicting animations from starting." into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e63ef53db5
@@ -879,7 +879,7 @@ public class BubbleStackView extends FrameLayout
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -767,6 +767,10 @@ public class PhysicsAnimationLayout extends FrameLayout {
|
||||
int targetAnimDuration,
|
||||
TimeInterpolator targetAnimInterpolator,
|
||||
Runnable... pathAnimEndActions) {
|
||||
if (mPathAnimator != null) {
|
||||
mPathAnimator.cancel();
|
||||
}
|
||||
|
||||
mPathAnimator = ObjectAnimator.ofFloat(
|
||||
this, mCurrentPointOnPathXProperty, mCurrentPointOnPathYProperty, path);
|
||||
|
||||
|
||||
@@ -459,6 +459,10 @@ public class StackAnimationController extends
|
||||
float friction,
|
||||
SpringForce spring,
|
||||
Float finalPosition) {
|
||||
if (!isActiveController()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d(TAG, String.format("Flinging %s.",
|
||||
PhysicsAnimationLayout.getReadablePropertyName(property)));
|
||||
|
||||
@@ -679,7 +683,7 @@ public class StackAnimationController extends
|
||||
DynamicAnimation.ViewProperty property, SpringForce spring,
|
||||
float vel, float finalPosition, @Nullable Runnable... after) {
|
||||
|
||||
if (mLayout.getChildCount() == 0) {
|
||||
if (mLayout.getChildCount() == 0 || !isActiveController()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user