diff options
author | Winson Chung <winsonc@google.com> | 2012-05-23 11:13:42 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-05-23 11:13:42 -0700 |
commit | a728543a34e4095dfd1f661dfd3dd6d2ccbca657 (patch) | |
tree | 50b9b74ea3f1cea6b533736783fbc6119a48b741 | |
parent | b77f116a2b0489178cc4803952027ce9eb5289ad (diff) | |
parent | 7bdfc9700b1cad043c04c757f134db1bf3df00da (diff) | |
download | android_packages_apps_Trebuchet-a728543a34e4095dfd1f661dfd3dd6d2ccbca657.tar.gz android_packages_apps_Trebuchet-a728543a34e4095dfd1f661dfd3dd6d2ccbca657.tar.bz2 android_packages_apps_Trebuchet-a728543a34e4095dfd1f661dfd3dd6d2ccbca657.zip |
Merge "Fix a couple small bugs (issue 6539339)" into jb-dev
-rw-r--r-- | src/com/android/launcher2/CellLayout.java | 8 | ||||
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java index e4b5af3b5..5591c9acc 100644 --- a/src/com/android/launcher2/CellLayout.java +++ b/src/com/android/launcher2/CellLayout.java @@ -80,7 +80,6 @@ public class CellLayout extends ViewGroup { // return an (x, y) value from helper functions. Do NOT use them to maintain other state. private final int[] mTmpXY = new int[2]; private final int[] mTmpPoint = new int[2]; - private final PointF mTmpPointF = new PointF(); int[] mTempLocation = new int[2]; boolean[][] mOccupied; @@ -149,7 +148,7 @@ public class CellLayout extends ViewGroup { static final int LANDSCAPE = 0; static final int PORTRAIT = 1; - private static final float REORDER_HINT_MAGNITUDE = 0.10f; + private static final float REORDER_HINT_MAGNITUDE = 0.12f; private static final int REORDER_ANIMATION_DURATION = 150; private float mReorderHintAnimationMagnitude; @@ -1969,7 +1968,9 @@ public class CellLayout extends ViewGroup { va = ValueAnimator.ofFloat(0f, 1f); va.setRepeatMode(ValueAnimator.REVERSE); va.setRepeatCount(ValueAnimator.INFINITE); - va.setDuration((int) (DURATION * (1.0f + Math.random()*.08f))); + va.setDuration(DURATION); + va.setStartDelay((int) ((Math.max(REORDER_ANIMATION_DURATION, delay) + + Math.random() * 60))); va.addUpdateListener(new AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { @@ -1993,7 +1994,6 @@ public class CellLayout extends ViewGroup { } } }); - va.setStartDelay(Math.max(REORDER_ANIMATION_DURATION, delay)); mShakeAnimators.put(child, this); va.start(); } diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index 905ad8a89..047c16c71 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -2194,6 +2194,9 @@ public class Workspace extends SmoothPagedView resizeOnDrop = true; item.spanX = resultSpan[0]; item.spanY = resultSpan[1]; + AppWidgetHostView awhv = (AppWidgetHostView) cell; + AppWidgetResizeFrame.updateWidgetSizeRanges(awhv, mLauncher, resultSpan[0], + resultSpan[1]); } if (mCurrentPage != screen && !hasMovedIntoHotseat) { |