Fixes to all apps pull up work

b/28917826

- 2+ workspace page also slides up
- pull up touch interaction doesn't trigger only when yslop > xslop
- animation duration should be set independently when all apps button is used.
- workspace state is correctly set (drag and drop from the trays work)
- after lock screen, hotseat is positioned correctly
- Remove initial jump when sliding up
- Improved tuning on sliding
- Alpha value set differently on backbround and content of all apps

Still not fixed:
- Landscape
- Search edit text box styling
- All apps scroll bar

Change-Id: I817094b0f1ada5052ee604539459f556a99cadf1
This commit is contained in:
Hyunyoung Song
2016-06-08 16:29:32 -07:00
parent b7c2e99ffb
commit 74b5af3529
5 changed files with 85 additions and 51 deletions

View File

@@ -248,13 +248,12 @@ public class LauncherStateTransitionAnimation {
// Cancel the current animation
cancelAnimation();
if (!FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP) {
playCommonTransitionAnimations(toWorkspaceState, fromView, toView,
animated, initialized, animation, revealDuration, layerViews);
}
final View contentView = toView.getContentView();
if (!animated || !initialized) {
playCommonTransitionAnimations(toWorkspaceState, fromView, toView,
animated, initialized, animation, revealDuration, layerViews);
toView.setTranslationX(0.0f);
toView.setTranslationY(0.0f);
toView.setScaleX(1.0f);
@@ -277,6 +276,9 @@ public class LauncherStateTransitionAnimation {
return null;
}
if (animType == CIRCULAR_REVEAL) {
playCommonTransitionAnimations(toWorkspaceState, fromView, toView,
animated, initialized, animation, revealDuration, layerViews);
// Setup the reveal view animation
final View revealView = toView.getRevealView();
@@ -421,9 +423,10 @@ public class LauncherStateTransitionAnimation {
cleanupAnimation();
pCb.onTransitionComplete();
}
});
mAllAppsController.animateToAllApps(animation);
mAllAppsController.animateToAllApps(animation, revealDuration);
playCommonTransitionAnimations(toWorkspaceState, fromView, toView,
animated, initialized, animation, revealDuration, layerViews);
dispatchOnLauncherTransitionPrepare(fromView, animated, false);
dispatchOnLauncherTransitionPrepare(toView, animated, false);
@@ -672,11 +675,9 @@ public class LauncherStateTransitionAnimation {
boolean multiplePagesVisible = toWorkspaceState.hasMultipleVisiblePages;
if (!FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP) {
if (!animated || !initialized) {
playCommonTransitionAnimations(toWorkspaceState, fromView, toView,
animated, initialized, animation, revealDuration, layerViews);
}
if (!animated || !initialized) {
if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP) {
mAllAppsController.finishPullDown();
}
@@ -697,6 +698,8 @@ public class LauncherStateTransitionAnimation {
return null;
}
if (animType == CIRCULAR_REVEAL) {
playCommonTransitionAnimations(toWorkspaceState, fromView, toView,
animated, initialized, animation, revealDuration, layerViews);
final View revealView = fromView.getRevealView();
final View contentView = fromView.getContentView();
@@ -876,7 +879,9 @@ public class LauncherStateTransitionAnimation {
}
});
mAllAppsController.animateToWorkspace(animation);
mAllAppsController.animateToWorkspace(animation, revealDuration);
playCommonTransitionAnimations(toWorkspaceState, fromView, toView,
animated, initialized, animation, revealDuration, layerViews);
// Dispatch the prepare transition signal
dispatchOnLauncherTransitionPrepare(fromView, animated, false);