summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/allapps/AllAppsTransitionController.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-12-13 17:16:54 -0800
committerSunny Goyal <sunnygoyal@google.com>2017-12-14 11:43:48 -0800
commitb532dfe45df5cf254e4ea6ab7c7e01051834ad65 (patch)
tree9e9cc34a2854168058a7ec5ceaa43fb23c5114b7 /src/com/android/launcher3/allapps/AllAppsTransitionController.java
parente7794795a06319b3cdf4ecf44f3d2eabee1d9310 (diff)
downloadpackages_apps_Trebuchet-b532dfe45df5cf254e4ea6ab7c7e01051834ad65.tar.gz
packages_apps_Trebuchet-b532dfe45df5cf254e4ea6ab7c7e01051834ad65.tar.bz2
packages_apps_Trebuchet-b532dfe45df5cf254e4ea6ab7c7e01051834ad65.zip
Updating the hotseat background to a solid color with rounded corners
Change-Id: I297920518f925e122f2e9f55a68228b96b42ea27
Diffstat (limited to 'src/com/android/launcher3/allapps/AllAppsTransitionController.java')
-rw-r--r--src/com/android/launcher3/allapps/AllAppsTransitionController.java23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
index 5de58b472..5830f740d 100644
--- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java
+++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
@@ -24,6 +24,7 @@ import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.graphics.GradientView;
import com.android.launcher3.util.SystemUiController;
import com.android.launcher3.util.Themes;
+import com.android.launcher3.views.AllAppsScrim;
/**
* Handles AllApps view transition.
@@ -74,7 +75,7 @@ public class AllAppsTransitionController
private static final float DEFAULT_SHIFT_RANGE = 10;
- private GradientView mGradientView;
+ private AllAppsScrim mAllAppsScrim;
public AllAppsTransitionController(Launcher l) {
mLauncher = l;
@@ -106,14 +107,6 @@ public class AllAppsTransitionController
}
}
- private void updateAllAppsBg(float progress) {
- // gradient
- if (mGradientView == null) {
- mGradientView = mLauncher.findViewById(R.id.gradient_bg);
- }
- mGradientView.setProgress(progress);
- }
-
/**
* Note this method should not be called outside this class. This is public because it is used
* in xml-based animations which also handle updating the appropriate UI.
@@ -131,17 +124,21 @@ public class AllAppsTransitionController
float alpha = 1 - workspaceHotseatAlpha;
float hotseatAlpha = mHotseatAccelInterpolator.getInterpolation(workspaceHotseatAlpha);
- updateAllAppsBg(alpha);
mAppsView.setAlpha(alpha);
mAppsView.setTranslationY(shiftCurrent);
+ if (mAllAppsScrim == null) {
+ mAllAppsScrim = mLauncher.findViewById(R.id.all_apps_scrim);
+ }
+ float hotseatTranslation = -mShiftRange + shiftCurrent;
+ mAllAppsScrim.setProgress(hotseatTranslation, alpha);
+
if (!mLauncher.getDeviceProfile().isVerticalBarLayout()) {
- mWorkspace.setHotseatTranslationAndAlpha(Workspace.Direction.Y, -mShiftRange + shiftCurrent,
+ mWorkspace.setHotseatTranslationAndAlpha(Workspace.Direction.Y, hotseatTranslation,
hotseatAlpha);
} else {
mWorkspace.setHotseatTranslationAndAlpha(Workspace.Direction.Y,
- PARALLAX_COEFFICIENT * (-mShiftRange + shiftCurrent),
- hotseatAlpha);
+ PARALLAX_COEFFICIENT * hotseatTranslation, hotseatAlpha);
}
updateLightStatusBar(shiftCurrent);