diff options
author | Adam Cohen <adamcohen@google.com> | 2011-03-28 17:33:39 -0700 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2011-03-28 17:37:35 -0700 |
commit | d5e42733799817d11d739b0a882da8dda721126d (patch) | |
tree | fbbb3caba47cd76d27f6adba810b460f3cabab5c /src/com/android/launcher2/CellLayoutChildren.java | |
parent | 8878a32f26b7e6c287d970950526cd0e6eabb21d (diff) | |
download | android_packages_apps_Trebuchet-d5e42733799817d11d739b0a882da8dda721126d.tar.gz android_packages_apps_Trebuchet-d5e42733799817d11d739b0a882da8dda721126d.tar.bz2 android_packages_apps_Trebuchet-d5e42733799817d11d739b0a882da8dda721126d.zip |
Fixing drop animation from AllApps on phone (bug 4174466)
Change-Id: I90d4c7e0cef6089d161c2ced7687e9edb3a3953a
Diffstat (limited to 'src/com/android/launcher2/CellLayoutChildren.java')
-rw-r--r-- | src/com/android/launcher2/CellLayoutChildren.java | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/com/android/launcher2/CellLayoutChildren.java b/src/com/android/launcher2/CellLayoutChildren.java index 11b2f9e70..e4e6fb197 100644 --- a/src/com/android/launcher2/CellLayoutChildren.java +++ b/src/com/android/launcher2/CellLayoutChildren.java @@ -75,27 +75,31 @@ public class CellLayoutChildren extends ViewGroup { @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - final int cellWidth = mCellWidth; - final int cellHeight = mCellHeight; int count = getChildCount(); for (int i = 0; i < count; i++) { View child = getChildAt(i); - CellLayout.LayoutParams lp = (CellLayout.LayoutParams) child.getLayoutParams(); - - lp.setup(cellWidth, cellHeight, mWidthGap, mHeightGap, - mLeftPadding, mTopPadding); - - int childWidthMeasureSpec = MeasureSpec.makeMeasureSpec(lp.width, MeasureSpec.EXACTLY); - int childheightMeasureSpec = MeasureSpec.makeMeasureSpec(lp.height, - MeasureSpec.EXACTLY); - - child.measure(childWidthMeasureSpec, childheightMeasureSpec); + measureChild(child); } int widthSpecSize = MeasureSpec.getSize(widthMeasureSpec); int heightSpecSize = MeasureSpec.getSize(heightMeasureSpec); setMeasuredDimension(widthSpecSize, heightSpecSize); } + public void measureChild(View child) { + final int cellWidth = mCellWidth; + final int cellHeight = mCellHeight; + CellLayout.LayoutParams lp = (CellLayout.LayoutParams) child.getLayoutParams(); + + lp.setup(cellWidth, cellHeight, mWidthGap, mHeightGap, + mLeftPadding, mTopPadding); + + int childWidthMeasureSpec = MeasureSpec.makeMeasureSpec(lp.width, MeasureSpec.EXACTLY); + int childheightMeasureSpec = MeasureSpec.makeMeasureSpec(lp.height, + MeasureSpec.EXACTLY); + + child.measure(childWidthMeasureSpec, childheightMeasureSpec); + } + @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { int count = getChildCount(); |