summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/AppWidgetResizeFrame.java
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2013-03-13 12:55:46 +0100
committerMichael Jurka <mikejurka@google.com>2013-03-28 12:08:18 -0700
commitf1ad608c28c79c8e9b83d83ce9154f1b7284f412 (patch)
tree67600627cdeaec5bedaac83b5d889a61b30f1e9c /src/com/android/launcher2/AppWidgetResizeFrame.java
parentb8f5c401de0a081557d8c014c0ecf00264d5f266 (diff)
downloadandroid_packages_apps_Trebuchet-f1ad608c28c79c8e9b83d83ce9154f1b7284f412.tar.gz
android_packages_apps_Trebuchet-f1ad608c28c79c8e9b83d83ce9154f1b7284f412.tar.bz2
android_packages_apps_Trebuchet-f1ad608c28c79c8e9b83d83ce9154f1b7284f412.zip
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
Diffstat (limited to 'src/com/android/launcher2/AppWidgetResizeFrame.java')
-rw-r--r--src/com/android/launcher2/AppWidgetResizeFrame.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/launcher2/AppWidgetResizeFrame.java b/src/com/android/launcher2/AppWidgetResizeFrame.java
index 0fd39aee2..4b544147e 100644
--- a/src/com/android/launcher2/AppWidgetResizeFrame.java
+++ b/src/com/android/launcher2/AppWidgetResizeFrame.java
@@ -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);