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.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index d742d429a..8e29b4055 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -310,7 +310,8 @@ public class Workspace extends SmoothPagedView
mLauncher = (Launcher) context;
final Resources res = getResources();
- mWorkspaceFadeInAdjacentScreens = res.getBoolean(R.bool.config_workspaceFadeAdjacentScreens);
+ mWorkspaceFadeInAdjacentScreens = LauncherAppState.getInstance().getDynamicGrid().
+ getDeviceProfile().shouldFadeAdjacentWorkspaceScreens();
mFadeInAdjacentScreens = false;
mWallpaperManager = WallpaperManager.getInstance(context);
@@ -1488,12 +1489,6 @@ public class Workspace extends SmoothPagedView
float scrollProgress = getScrollProgress(screenCenter, child, i);
float alpha = 1 - Math.abs(scrollProgress);
child.getShortcutsAndWidgets().setAlpha(alpha);
- if (!mIsDragOccuring) {
- child.setBackgroundAlphaMultiplier(
- backgroundAlphaInterpolator(Math.abs(scrollProgress)));
- } else {
- child.setBackgroundAlphaMultiplier(1f);
- }
}
}
}
@@ -2108,7 +2103,14 @@ public class Workspace extends SmoothPagedView
final CellLayout cl = (CellLayout) getChildAt(i);
boolean isCurrentPage = (i == getNextPage());
float initialAlpha = cl.getShortcutsAndWidgets().getAlpha();
- float finalAlpha = stateIsSmall ? 0f : 1f;
+ float finalAlpha;
+ if (stateIsSmall) {
+ finalAlpha = 0f;
+ } else if (stateIsNormal && mWorkspaceFadeInAdjacentScreens) {
+ finalAlpha = i == getNextPage() ? 1f : 0f;
+ } else {
+ finalAlpha = 1f;
+ }
// If we are animating to/from the small state, then hide the side pages and fade the
// current page in