mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Initial changes to tweak layout.
- Adding DeviceProfile callback for when the launcher layout changes due to insets. This is necessary since there are now different layouts depending on which side the navigation bar is on - Consolidating hotseat and other layout into the device profile launcher layout logic - Making the all apps icons match the workspace icon height - Tweaking caret drawable to draw to the bounds specified to simplify layout in each orientation - Fixing minor issue with page indicator shifting in landscape - Centering overview buttons to the workspace page Bug: 30021487 Change-Id: I1866bce00b2948f3edd06168c0f88d81207e3f13
This commit is contained in:
@@ -298,6 +298,7 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
|
||||
mShiftCurrent = progress;
|
||||
float alpha = calcAlphaAllApps(progress);
|
||||
float workspaceHotseatAlpha = 1 - alpha;
|
||||
float interpolation = mAccelInterpolator.getInterpolation(workspaceHotseatAlpha);
|
||||
|
||||
int color = (Integer) mEvaluator.evaluate(mDecelInterpolator.getInterpolation(alpha),
|
||||
mHotseatBackgroundColor, mAllAppsBackgroundColor);
|
||||
@@ -306,14 +307,13 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
|
||||
mAppsView.setTranslationY(progress);
|
||||
mWorkspace.setWorkspaceYTranslationAndAlpha(
|
||||
PARALLAX_COEFFICIENT * (-mShiftRange + progress),
|
||||
mAccelInterpolator.getInterpolation(workspaceHotseatAlpha));
|
||||
if (!mLauncher.getDeviceProfile().isVerticalBarLayout()) {
|
||||
mWorkspace.setHotseatTranslationAndAlpha(Direction.Y, -mShiftRange + progress,
|
||||
mAccelInterpolator.getInterpolation(workspaceHotseatAlpha));
|
||||
interpolation);
|
||||
if (mLauncher.getDeviceProfile().isVerticalBarLayout()) {
|
||||
mWorkspace.setHotseatTranslationAndAlpha(Direction.Y,
|
||||
PARALLAX_COEFFICIENT * (-mShiftRange + progress), interpolation);
|
||||
} else {
|
||||
mWorkspace.setHotseatTranslationAndAlpha(Direction.Y,
|
||||
PARALLAX_COEFFICIENT * (-mShiftRange + progress),
|
||||
mAccelInterpolator.getInterpolation(workspaceHotseatAlpha));
|
||||
-mShiftRange + progress, interpolation);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user