summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/CellLayout.java
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2011-01-07 12:58:57 -0800
committerMichael Jurka <mikejurka@google.com>2011-01-07 12:59:10 -0800
commit026f555b34800577b4bdb789305553ddde563f59 (patch)
tree5aaaa892c11b627f5ae50119cd07a3dbde9f413a /src/com/android/launcher2/CellLayout.java
parent322e041968687af057ef5ed073afa0b387e2022c (diff)
downloadandroid_packages_apps_Trebuchet-026f555b34800577b4bdb789305553ddde563f59.tar.gz
android_packages_apps_Trebuchet-026f555b34800577b4bdb789305553ddde563f59.tar.bz2
android_packages_apps_Trebuchet-026f555b34800577b4bdb789305553ddde563f59.zip
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)
Diffstat (limited to 'src/com/android/launcher2/CellLayout.java')
-rw-r--r--src/com/android/launcher2/CellLayout.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 121aa226d..fd1f0487b 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 {