diff options
author | Adam Powell <adamp@google.com> | 2010-05-03 10:23:50 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2010-05-03 10:23:50 -0700 |
commit | fefa0ce22af9560f1c0f8c84c760c75f34b7b12c (patch) | |
tree | c16f8ce630ac457e288ff5401d036ec275eff587 /src/com | |
parent | 1896a6ec2d537aaf2996018e04f4f746bd1071d6 (diff) | |
download | android_packages_apps_Trebuchet-fefa0ce22af9560f1c0f8c84c760c75f34b7b12c.tar.gz android_packages_apps_Trebuchet-fefa0ce22af9560f1c0f8c84c760c75f34b7b12c.tar.bz2 android_packages_apps_Trebuchet-fefa0ce22af9560f1c0f8c84c760c75f34b7b12c.zip |
Fix bug 2646531 - regression in home screen bitmap caching
Looks like the code path for buildDrawingCache(false) has some bugs.
This reverts to the old code path and tries to manage the creation of
those caches a bit better.
Change-Id: Ic468e9db396c51f723454dc3832e0cd1c0c82004
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/launcher2/CellLayout.java | 2 | ||||
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java index bc52af128..9d39c2ca7 100644 --- a/src/com/android/launcher2/CellLayout.java +++ b/src/com/android/launcher2/CellLayout.java @@ -584,7 +584,7 @@ public class CellLayout extends ViewGroup { final View view = getChildAt(i); view.setDrawingCacheEnabled(enabled); // Update the drawing caches - view.buildDrawingCache(false); + view.buildDrawingCache(true); } } diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index dca40cec4..f1e8d96e3 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -666,7 +666,7 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag // Scroll if the user moved far enough along the X axis mTouchState = TOUCH_STATE_SCROLLING; mLastMotionX = x; - enableChildrenCache(0, getChildCount()); + enableChildrenCache(mCurrentScreen - 1, mCurrentScreen + 1); } // Either way, cancel any pending longpress if (mAllowLongPress) { @@ -868,6 +868,9 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag // Remember where the motion event started mLastMotionX = ev.getX(); mActivePointerId = ev.getPointerId(0); + if (mTouchState == TOUCH_STATE_SCROLLING) { + enableChildrenCache(mCurrentScreen - 1, mCurrentScreen + 1); + } break; case MotionEvent.ACTION_MOVE: if (mTouchState == TOUCH_STATE_SCROLLING) { |