summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/PinchAnimationManager.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-10-26 13:06:08 -0700
committerSunny Goyal <sunnygoyal@google.com>2016-10-26 17:14:12 -0700
commit9ccafbff26f5835ab9725d876d1bf7ccd08ccf84 (patch)
treeb02123a1bce19da21769cc00e7cb80b6a86f147c /src/com/android/launcher3/PinchAnimationManager.java
parent35fe7be54e4c9b47598130f5234ea96c4dc16229 (diff)
downloadandroid_packages_apps_Trebuchet-9ccafbff26f5835ab9725d876d1bf7ccd08ccf84.tar.gz
android_packages_apps_Trebuchet-9ccafbff26f5835ab9725d876d1bf7ccd08ccf84.tar.bz2
android_packages_apps_Trebuchet-9ccafbff26f5835ab9725d876d1bf7ccd08ccf84.zip
Removing custom dispatchDraw logic and letting the system handle
selecting appropriate children for drawing. > System already skips children which are outside the bounds. Originally this logic was added because workspace layout is larger than the screen, and we need to selectivly skip more children. But over time we have added many special conditions and at present workspace actually draws more children than needed at any given time. > Fixing bug, where onBeginPageMoving was getting called during folder open Bug: 12116740 Change-Id: Idee18ee9cd9d348ebc4dfd82f4ff6df14e0d22d2
Diffstat (limited to 'src/com/android/launcher3/PinchAnimationManager.java')
-rw-r--r--src/com/android/launcher3/PinchAnimationManager.java15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/com/android/launcher3/PinchAnimationManager.java b/src/com/android/launcher3/PinchAnimationManager.java
index 84ef12e16..3cc0f7d3f 100644
--- a/src/com/android/launcher3/PinchAnimationManager.java
+++ b/src/com/android/launcher3/PinchAnimationManager.java
@@ -60,7 +60,6 @@ public class PinchAnimationManager {
private final Animator[] mAnimators = new Animator[4];
- private final int[] mVisiblePageRange = new int[2];
private Launcher mLauncher;
private Workspace mWorkspace;
@@ -181,17 +180,13 @@ public class PinchAnimationManager {
}
private void setOverviewPanelsAlpha(float alpha, int duration) {
- mWorkspace.getVisiblePages(mVisiblePageRange);
- for (int i = mVisiblePageRange[0]; i <= mVisiblePageRange[1]; i++) {
- View page = mWorkspace.getPageAt(i);
- if (!mWorkspace.shouldDrawChild(page)) {
- continue;
- }
+ int childCount = mWorkspace.getChildCount();
+ for (int i = 0; i < childCount; i++) {
+ final CellLayout cl = (CellLayout) mWorkspace.getChildAt(i);
if (duration == 0) {
- ((CellLayout) page).setBackgroundAlpha(alpha);
+ cl.setBackgroundAlpha(alpha);
} else {
- ObjectAnimator.ofFloat(page, "backgroundAlpha", alpha)
- .setDuration(duration).start();
+ ObjectAnimator.ofFloat(cl, "backgroundAlpha", alpha).setDuration(duration).start();
}
}
}