Make RectFSpringAnim resilient to negative height starting rect.
Test: ran tapl tests, failed before, passed after Change-Id: I10b82dd348b5c12550e60b145c76dad542aa56e8
This commit is contained in:
@@ -165,7 +165,7 @@ public class RectFSpringAnim {
|
||||
mRectYAnim = new FlingSpringAnim(this, RECT_Y, startY, endY, startVelocityY,
|
||||
mMinVisChange, minYValue, maxYValue, springVelocityFactor, onYEndListener);
|
||||
|
||||
float minVisibleChange = 1f / mStartRect.height();
|
||||
float minVisibleChange = Math.abs(1f / mStartRect.height());
|
||||
mRectScaleAnim = new SpringAnimation(this, RECT_SCALE_PROGRESS)
|
||||
.setSpring(new SpringForce(1f)
|
||||
.setDampingRatio(SpringForce.DAMPING_RATIO_LOW_BOUNCY)
|
||||
|
||||
Reference in New Issue
Block a user