mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Updating landscape layout for launcher/quickstep
> Hotseat is tied to navbar (on left in seascape) > Search box shows up in Overview (clicking it would crash for now) > All-apps is no longer fullscreen in landscape > Recents cards are appropriately scaled down > Hotseat is visible in Overview Bug: 70179916 Change-Id: I53149eaeac9557e8a01021b7e2d139f3d6ceef37
This commit is contained in:
@@ -43,23 +43,28 @@ public class SpringLoadedState extends LauncherState {
|
||||
private static final int RESTORE_SCREEN_ORIENTATION_DELAY = 500;
|
||||
|
||||
public SpringLoadedState(int id) {
|
||||
super(id, ContainerType.OVERVIEW, SPRING_LOADED_TRANSITION_MS, 1f, STATE_FLAGS);
|
||||
super(id, ContainerType.OVERVIEW, SPRING_LOADED_TRANSITION_MS, STATE_FLAGS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float[] getWorkspaceScaleAndTranslation(Launcher launcher) {
|
||||
DeviceProfile grid = launcher.getDeviceProfile();
|
||||
Workspace ws = launcher.getWorkspace();
|
||||
if (grid.isVerticalBarLayout() || ws.getChildCount() == 0) {
|
||||
if (ws.getChildCount() == 0) {
|
||||
return super.getWorkspaceScaleAndTranslation(launcher);
|
||||
}
|
||||
|
||||
if (grid.isVerticalBarLayout()) {
|
||||
float scale = grid.workspaceSpringLoadShrinkFactor;
|
||||
return new float[] {scale, 0, 0};
|
||||
}
|
||||
|
||||
float scale = grid.workspaceSpringLoadShrinkFactor;
|
||||
Rect insets = launcher.getDragLayer().getInsets();
|
||||
|
||||
float scaledHeight = scale * ws.getNormalChildHeight();
|
||||
float shrunkTop = insets.top + grid.dropTargetBarSizePx;
|
||||
float shrunkBottom = ws.getViewportHeight() - insets.bottom
|
||||
float shrunkBottom = ws.getMeasuredHeight() - insets.bottom
|
||||
- grid.getWorkspacePadding(null).bottom
|
||||
- grid.workspaceSpringLoadedBottomSpace;
|
||||
float totalShrunkSpace = shrunkBottom - shrunkTop;
|
||||
|
||||
Reference in New Issue
Block a user