diff options
Diffstat (limited to 'src/com/android/launcher3/CellLayout.java')
-rw-r--r-- | src/com/android/launcher3/CellLayout.java | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java index 93006b3f5..89473c8b1 100644 --- a/src/com/android/launcher3/CellLayout.java +++ b/src/com/android/launcher3/CellLayout.java @@ -72,6 +72,7 @@ public class CellLayout extends ViewGroup { private int mHeightGap; private int mMaxGap; private boolean mDropPending = false; + private boolean mIsDragTarget = true; // These are temporary variables to prevent having to allocate a new object just to // return an (x, y) value from helper functions. Do NOT use them to maintain other state. @@ -367,14 +368,6 @@ public class CellLayout extends ViewGroup { } } - void setIsDragOverlapping(boolean isDragOverlapping) { - if (mIsDragOverlapping != isDragOverlapping) { - mIsDragOverlapping = isDragOverlapping; - setUseActiveGlowBackground(mIsDragOverlapping); - invalidate(); - } - } - void setUseActiveGlowBackground(boolean use) { mUseActiveGlowBackground = use; } @@ -383,6 +376,22 @@ public class CellLayout extends ViewGroup { mDrawBackground = false; } + void disableDragTarget() { + mIsDragTarget = false; + } + + boolean isDragTarget() { + return mIsDragTarget; + } + + void setIsDragOverlapping(boolean isDragOverlapping) { + if (mIsDragOverlapping != isDragOverlapping) { + mIsDragOverlapping = isDragOverlapping; + setUseActiveGlowBackground(mIsDragOverlapping); + invalidate(); + } + } + boolean getIsDragOverlapping() { return mIsDragOverlapping; } @@ -946,6 +955,7 @@ public class CellLayout extends ViewGroup { } public void setBackgroundAlphaMultiplier(float multiplier) { + if (mBackgroundAlphaMultiplier != multiplier) { mBackgroundAlphaMultiplier = multiplier; invalidate(); |