Separating various UI properties into state variables

> Using workspace scale and translation for all-apps
> Without quickstep, workspace has the parallex effect as before
> With quickstep, workspace scales down to match the recents card width
> Using a single animator for recents views in case of state transtion and
  controlled transition to prevent going into inconsistant state.

Change-Id: I1864de6892052ca771f4d0062e3d60c28840a72d
This commit is contained in:
Sunny Goyal
2017-12-06 10:25:07 -08:00
parent 92731d48d2
commit bc683e9d06
17 changed files with 283 additions and 98 deletions

View File

@@ -53,10 +53,9 @@ public class AllAppsTransitionController
}
};
private final Interpolator mWorkspaceAccelnterpolator = Interpolators.ACCEL_2;
private final Interpolator mHotseatAccelInterpolator = Interpolators.ACCEL_1_5;
private static final float PARALLAX_COEFFICIENT = .125f;
public static final float PARALLAX_COEFFICIENT = .125f;
private AllAppsContainerView mAppsView;
private Workspace mWorkspace;
@@ -131,7 +130,6 @@ public class AllAppsTransitionController
float workspaceHotseatAlpha = Utilities.boundToRange(progress, 0f, 1f);
float alpha = 1 - workspaceHotseatAlpha;
float workspaceAlpha = mWorkspaceAccelnterpolator.getInterpolation(workspaceHotseatAlpha);
float hotseatAlpha = mHotseatAccelInterpolator.getInterpolation(workspaceHotseatAlpha);
updateAllAppsBg(alpha);
@@ -146,8 +144,6 @@ public class AllAppsTransitionController
PARALLAX_COEFFICIENT * (-mShiftRange + shiftCurrent),
hotseatAlpha);
}
mWorkspace.setWorkspaceYTranslationAndAlpha(
PARALLAX_COEFFICIENT * (-mShiftRange + shiftCurrent), workspaceAlpha);
updateLightStatusBar(shiftCurrent);
}