Fix jumps in the beginning of animations
If the first draw frame of an animation is expensive, which it often is, it causes a big jump. Added a helper class which automatically adjusts the animation start time if the first frame is more than 16ms. Change-Id: I100edbc41c2abe930a32d6bcf0a782ea9735f7f9
This commit is contained in:
@@ -444,7 +444,8 @@ public class AppWidgetResizeFrame extends FrameLayout {
|
||||
newHeight);
|
||||
PropertyValuesHolder x = PropertyValuesHolder.ofInt("x", lp.x, newX);
|
||||
PropertyValuesHolder y = PropertyValuesHolder.ofInt("y", lp.y, newY);
|
||||
ObjectAnimator oa = LauncherAnimUtils.ofPropertyValuesHolder(lp, width, height, x, y);
|
||||
ObjectAnimator oa =
|
||||
LauncherAnimUtils.ofPropertyValuesHolder(lp, this, width, height, x, y);
|
||||
ObjectAnimator leftOa = LauncherAnimUtils.ofFloat(mLeftHandle, "alpha", 1.0f);
|
||||
ObjectAnimator rightOa = LauncherAnimUtils.ofFloat(mRightHandle, "alpha", 1.0f);
|
||||
ObjectAnimator topOa = LauncherAnimUtils.ofFloat(mTopHandle, "alpha", 1.0f);
|
||||
|
||||
Reference in New Issue
Block a user