diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-05-19 19:59:09 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-05-19 20:03:06 -0700 |
commit | 057397714327b42c55804624cc06c7761d999f84 (patch) | |
tree | 2c3ba553285b6af6ab4e47e4d480da18b99a4e1c /src/com/android/launcher3/CellLayout.java | |
parent | 39b83c62566f6914f9169cd9ee5f1edb44815109 (diff) | |
download | android_packages_apps_Trebuchet-057397714327b42c55804624cc06c7761d999f84.tar.gz android_packages_apps_Trebuchet-057397714327b42c55804624cc06c7761d999f84.tar.bz2 android_packages_apps_Trebuchet-057397714327b42c55804624cc06c7761d999f84.zip |
Removing some unused functionalities
> Removing obsolete progrard rules
> Removing BackgroundAlphaMultiplier from CellLayout, which is always 1
> Removign otiline animation from workspace. This animation never runs,
as it is called during startReordeing which always happens when
overview mode (workspaceInModalState() is true)
Change-Id: I43219e41ea188771bc818988c1bcbd523f28cba6
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 57db805d8..48ddfe6bf 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; |