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,
|
int targetAnimDuration,
|
||||||
TimeInterpolator targetAnimInterpolator,
|
TimeInterpolator targetAnimInterpolator,
|
||||||
Runnable... pathAnimEndActions) {
|
Runnable... pathAnimEndActions) {
|
||||||
|
if (mPathAnimator != null) {
|
||||||
|
mPathAnimator.cancel();
|
||||||
|
}
|
||||||
|
|
||||||
mPathAnimator = ObjectAnimator.ofFloat(
|
mPathAnimator = ObjectAnimator.ofFloat(
|
||||||
this, mCurrentPointOnPathXProperty, mCurrentPointOnPathYProperty, path);
|
this, mCurrentPointOnPathXProperty, mCurrentPointOnPathYProperty, path);
|
||||||
|
|
||||||
|
|||||||
@@ -459,6 +459,10 @@ public class StackAnimationController extends
|
|||||||
float friction,
|
float friction,
|
||||||
SpringForce spring,
|
SpringForce spring,
|
||||||
Float finalPosition) {
|
Float finalPosition) {
|
||||||
|
if (!isActiveController()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Log.d(TAG, String.format("Flinging %s.",
|
Log.d(TAG, String.format("Flinging %s.",
|
||||||
PhysicsAnimationLayout.getReadablePropertyName(property)));
|
PhysicsAnimationLayout.getReadablePropertyName(property)));
|
||||||
|
|
||||||
@@ -679,7 +683,7 @@ public class StackAnimationController extends
|
|||||||
DynamicAnimation.ViewProperty property, SpringForce spring,
|
DynamicAnimation.ViewProperty property, SpringForce spring,
|
||||||
float vel, float finalPosition, @Nullable Runnable... after) {
|
float vel, float finalPosition, @Nullable Runnable... after) {
|
||||||
|
|
||||||
if (mLayout.getChildCount() == 0) {
|
if (mLayout.getChildCount() == 0 || !isActiveController()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user