summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Workspace.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/Workspace.java')
-rw-r--r--src/com/android/launcher3/Workspace.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 9b17fcd9e..8602606fe 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -2108,11 +2108,12 @@ public class Workspace extends SmoothPagedView
mNewScale = 1.0f;
if (oldStateIsOverview) {
- disableFreeScroll(snapPage);
+ disableFreeScroll();
} else if (stateIsOverview) {
enableFreeScroll();
}
+
if (state != State.NORMAL) {
if (stateIsSpringLoaded) {
mNewScale = mSpringLoadedShrinkFactor;
@@ -2135,16 +2136,20 @@ public class Workspace extends SmoothPagedView
duration = getResources().getInteger(R.integer.config_appsCustomizeWorkspaceShrinkTime);
}
+ if (snapPage == -1) {
+ snapPage = getPageNearestToCenterOfScreen();
+ }
+ snapToPage(snapPage, duration, mZoomInInterpolator);
+
for (int i = 0; i < getChildCount(); i++) {
final CellLayout cl = (CellLayout) getChildAt(i);
- boolean isCurrentPage = (i == getNextPage());
+ boolean isCurrentPage = (i == snapPage);
float initialAlpha = cl.getShortcutsAndWidgets().getAlpha();
float finalAlpha;
if (stateIsSmall) {
finalAlpha = 0f;
} else if (stateIsNormal && mWorkspaceFadeInAdjacentScreens) {
-
- finalAlpha = (i == getNextPage() || i < numCustomPages()) ? 1f : 0f;
+ finalAlpha = (i == snapPage || i < numCustomPages()) ? 1f : 0f;
} else {
finalAlpha = 1f;
}