diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-05-20 22:35:48 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-20 22:35:49 +0000 |
commit | 20812e96402900d3ac0e007b5b63faaf1b06e5f9 (patch) | |
tree | f9ffdda5b7da5e9ad9fab248f4dbd82f00d90a6f /src/com/android/launcher3/CellLayout.java | |
parent | 2280e27842671d21fa29b6d7bd22b5912704471d (diff) | |
parent | 057397714327b42c55804624cc06c7761d999f84 (diff) | |
download | android_packages_apps_Trebuchet-20812e96402900d3ac0e007b5b63faaf1b06e5f9.tar.gz android_packages_apps_Trebuchet-20812e96402900d3ac0e007b5b63faaf1b06e5f9.tar.bz2 android_packages_apps_Trebuchet-20812e96402900d3ac0e007b5b63faaf1b06e5f9.zip |
Merge "Removing some unused functionalities" into ub-launcher3-burnaby
Diffstat (limited to 'src/com/android/launcher3/CellLayout.java')
-rw-r--r-- | src/com/android/launcher3/CellLayout.java | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java index edcdc1149..1d211bff1 100644 --- a/src/com/android/launcher3/CellLayout.java +++ b/src/com/android/launcher3/CellLayout.java @@ -103,8 +103,6 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler { private float FOREGROUND_ALPHA_DAMPER = 0.65f; private int mForegroundAlpha = 0; private float mBackgroundAlpha; - private float mBackgroundAlphaMultiplier = 1.0f; - private boolean mDrawBackground = true; private Drawable mNormalBackground; private Drawable mActiveGlowBackground; @@ -423,10 +421,6 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler { } } - void disableBackground() { - mDrawBackground = false; - } - void disableDragTarget() { mIsDragTarget = false; } @@ -448,12 +442,16 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler { @Override protected void onDraw(Canvas canvas) { + if (!mIsDragTarget) { + return; + } + // When we're large, we are either drawn in a "hover" state (ie when dragging an item to // a neighboring page) or with just a normal background (if backgroundAlpha > 0.0f) // When we're small, we are either drawn normally or in the "accepts drops" state (during // a drag). However, we also drag the mini hover background *over* one of those two // backgrounds - if (mDrawBackground && mBackgroundAlpha > 0.0f) { + if (mBackgroundAlpha > 0.0f) { Drawable bg; if (mIsDragOverlapping) { @@ -463,7 +461,7 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler { bg = mNormalBackground; } - bg.setAlpha((int) (mBackgroundAlpha * mBackgroundAlphaMultiplier * 255)); + bg.setAlpha((int) (mBackgroundAlpha * 255)); bg.setBounds(mBackgroundRect); bg.draw(canvas); } @@ -951,17 +949,6 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler { return mBackgroundAlpha; } - public void setBackgroundAlphaMultiplier(float multiplier) { - if (mBackgroundAlphaMultiplier != multiplier) { - mBackgroundAlphaMultiplier = multiplier; - invalidate(); - } - } - - public float getBackgroundAlphaMultiplier() { - return mBackgroundAlphaMultiplier; - } - public void setBackgroundAlpha(float alpha) { if (mBackgroundAlpha != alpha) { mBackgroundAlpha = alpha; |