mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user