From 026f555b34800577b4bdb789305553ddde563f59 Mon Sep 17 00:00:00 2001 From: Michael Jurka Date: Fri, 7 Jan 2011 12:58:57 -0800 Subject: [PATCH] Fix bug where stack view was getting clipped We were also updating CellLayouts' drawing cache even when not needed, this is now fixed (and was actually the cause of the bug) --- src/com/android/launcher2/CellLayout.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java index 121aa226d7..fd1f0487b8 100644 --- a/src/com/android/launcher2/CellLayout.java +++ b/src/com/android/launcher2/CellLayout.java @@ -437,8 +437,9 @@ public class CellLayout extends ViewGroup implements Dimmable { } } + boolean useBitmapCache = mIsCacheEnabled && getScaleX() < mMaxScaleForUsingBitmapCache; if (mForceCacheUpdate || - (mIsCacheEnabled && !mDisableCacheUpdates)) { + (useBitmapCache && !mDisableCacheUpdates)) { // Sometimes we force a cache update-- this is used to make sure the cache will look as // up-to-date as possible right when we disable cache updates if (mIsCacheDirty) { @@ -447,7 +448,7 @@ public class CellLayout extends ViewGroup implements Dimmable { mForceCacheUpdate = false; } - if (mIsCacheEnabled && getScaleX() < mMaxScaleForUsingBitmapCache) { + if (useBitmapCache) { mCachePaint.setAlpha((int)(255*getAlpha())); canvas.drawBitmap(mCache, mCacheRect, mBackgroundRect, mCachePaint); } else {