summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/Workspace.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/Workspace.java')
-rw-r--r--src/com/android/launcher2/Workspace.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 5daa05e08..a6ba98eb5 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -1120,10 +1120,16 @@ public class Workspace extends SmoothPagedView
backgroundAlphaInterpolator(Math.abs(scrollProgress)));
}
}
- cl.setTranslationX(translationX);
- cl.setRotationY(rotation);
+ cl.setFastTranslationX(translationX);
+ cl.setFastRotationY(rotation);
+ if (mFadeInAdjacentScreens && !isSmall()) {
+ float alpha = 1 - Math.abs(scrollProgress);
+ cl.setFastAlpha(alpha);
+ }
+ cl.fastInvalidate();
}
}
+ invalidate();
}
private void resetCellLayoutTransforms(CellLayout cl, boolean left) {
@@ -1157,10 +1163,12 @@ public class Workspace extends SmoothPagedView
@Override
protected void screenScrolled(int screenCenter) {
- super.screenScrolled(screenCenter);
if (LauncherApplication.isScreenLarge()) {
+ // We don't call super.screenScrolled() here because we handle the adjacent pages alpha
+ // ourselves (for efficiency), and there are no scrolling indicators to update.
screenScrolledLargeUI(screenCenter);
} else {
+ super.screenScrolled(screenCenter);
screenScrolledStandardUI(screenCenter);
}
}
@@ -1348,13 +1356,6 @@ public class Workspace extends SmoothPagedView
position[0], position[1], 0, null);
}
- @Override
- protected void updateAdjacentPagesAlpha() {
- if (!isSmall()) {
- super.updateAdjacentPagesAlpha();
- }
- }
-
/*
* This interpolator emulates the rate at which the perceived scale of an object changes
* as its distance from a camera increases. When this interpolator is applied to a scale
@@ -1517,7 +1518,6 @@ public class Workspace extends SmoothPagedView
final State oldState = mState;
final boolean oldStateIsNormal = (oldState == State.NORMAL);
- final boolean oldStateIsSpringLoaded = (oldState == State.SPRING_LOADED);
final boolean oldStateIsSmall = (oldState == State.SMALL);
mState = state;
final boolean stateIsNormal = (state == State.NORMAL);