summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/CellLayout.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2013-09-20 17:04:51 -0700
committerAdam Cohen <adamcohen@google.com>2013-09-20 17:06:05 -0700
commit5108bc0fd9f7e30c87c223fbb75f024e271b2103 (patch)
tree20d420d01a49b0eae625ad271cc41a537836becc /src/com/android/launcher3/CellLayout.java
parent477828cc83b60a17eb9b6fc8ee08b4abbc3d2fb1 (diff)
downloadandroid_packages_apps_Trebuchet-5108bc0fd9f7e30c87c223fbb75f024e271b2103.tar.gz
android_packages_apps_Trebuchet-5108bc0fd9f7e30c87c223fbb75f024e271b2103.tar.bz2
android_packages_apps_Trebuchet-5108bc0fd9f7e30c87c223fbb75f024e271b2103.zip
More folder cleanup
-> Eliminating out ring -> Fixing the cursor color -> Using "nolip" asset appropriately Change-Id: Ie0e341e865298555dcb0fcb5644e1f3e6b5e39e6
Diffstat (limited to 'src/com/android/launcher3/CellLayout.java')
-rw-r--r--src/com/android/launcher3/CellLayout.java33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index 901f42bdf..661685b42 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -491,31 +491,30 @@ public class CellLayout extends ViewGroup {
for (int i = 0; i < mFolderOuterRings.size(); i++) {
FolderRingAnimator fra = mFolderOuterRings.get(i);
- // Draw outer ring
- Drawable d = FolderRingAnimator.sSharedOuterRingDrawable;
- int width = (int) (fra.getOuterRingSize() * getChildrenScale());
- int height = width;
+ Drawable d;
+ int width, height;
cellToPoint(fra.mCellX, fra.mCellY, mTempLocation);
View child = getChildAt(fra.mCellX, fra.mCellY);
+ int centerX = mTempLocation[0] + mCellWidth / 2;
+ int centerY = mTempLocation[1] + previewOffset / 2 +
+ child.getPaddingTop() + grid.folderBackgroundOffset;
if (child != null) {
- int centerX = mTempLocation[0] + mCellWidth / 2;
- int centerY = mTempLocation[1] + previewOffset / 2 +
- child.getPaddingTop() + grid.folderBackgroundOffset;
-
- canvas.save();
- canvas.translate(centerX - width / 2, centerY - height / 2);
- d.setBounds(0, 0, width, height);
- d.draw(canvas);
- canvas.restore();
+ // Draw outer ring, if it exists
+ if (FolderIcon.HAS_OUTER_RING) {
+ d = FolderRingAnimator.sSharedOuterRingDrawable;
+ width = (int) (fra.getOuterRingSize() * getChildrenScale());
+ height = width;
+ canvas.save();
+ canvas.translate(centerX - width / 2, centerY - height / 2);
+ d.setBounds(0, 0, width, height);
+ d.draw(canvas);
+ canvas.restore();
+ }
// Draw inner ring
d = FolderRingAnimator.sSharedInnerRingDrawable;
width = (int) (fra.getInnerRingSize() * getChildrenScale());
height = width;
-
- centerX = mTempLocation[0] + mCellWidth / 2;
- centerY = mTempLocation[1] + previewOffset / 2 +
- child.getPaddingTop() + grid.folderBackgroundOffset;
canvas.save();
canvas.translate(centerX - width / 2, centerY - width / 2);
d.setBounds(0, 0, width, height);