diff options
author | Adam Cohen <adamcohen@google.com> | 2011-05-18 12:22:18 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-05-18 12:22:18 -0700 |
commit | 737c3aa05f3274d3828caf853fafadecddba5792 (patch) | |
tree | ad203548164f6f00924da67465c8f036466b6fa2 /src/com/android/launcher2/Workspace.java | |
parent | d1d48a68409c5f0777e608f83950b41a2306f3f3 (diff) | |
parent | f4b08913677e18a8412930972237b91d5a946d95 (diff) | |
download | android_packages_apps_Trebuchet-737c3aa05f3274d3828caf853fafadecddba5792.tar.gz android_packages_apps_Trebuchet-737c3aa05f3274d3828caf853fafadecddba5792.tar.bz2 android_packages_apps_Trebuchet-737c3aa05f3274d3828caf853fafadecddba5792.zip |
Merge "Pushed folder inner ring drawing into workspace during animation"
Diffstat (limited to 'src/com/android/launcher2/Workspace.java')
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index fed991c39..bc15b32a7 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -1234,15 +1234,26 @@ public class Workspace extends SmoothPagedView } } - // The folder outer ring image(s) + // The folder outer / inner ring image(s) for (int i = 0; i < mFolderOuterRings.size(); i++) { + + // Draw outer ring FolderIcon fi = mFolderOuterRings.get(i); - final Drawable d = FolderIcon.sFolderOuterRingDrawable; - final int width = (int) (d.getIntrinsicWidth() * fi.getOuterRingScale()); - final int height = (int) (d.getIntrinsicHeight() * fi.getOuterRingScale()); + Drawable d = FolderIcon.sFolderOuterRingDrawable; + int width = (int) (d.getIntrinsicWidth() * fi.getOuterRingScale()); + int height = (int) (d.getIntrinsicHeight() * fi.getOuterRingScale()); fi.getFolderLocation(mTempLocation); - final int x = mTempLocation[0] + mScrollX - width / 2; - final int y = mTempLocation[1] + mScrollY - height / 2; + int x = mTempLocation[0] + mScrollX - width / 2; + int y = mTempLocation[1] + mScrollY - height / 2; + d.setBounds(x, y, x + width, y + height); + d.draw(canvas); + + // Draw inner ring + d = FolderIcon.sFolderInnerRingDrawable; + width = (int) (fi.getMeasuredWidth() * fi.getInnerRingScale()); + height = (int) (fi.getMeasuredHeight() * fi.getInnerRingScale()); + x = mTempLocation[0] + mScrollX - width / 2; + y = mTempLocation[1] + mScrollY - height / 2; d.setBounds(x, y, x + width, y + height); d.draw(canvas); } |