Merge "Re-land "Update workspace, cell layout, shortcut and widget, and cell size calculations."" into tm-dev am: a54d1ab24a am: 0c1347ceff am: 25f9f045ff

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18280942

Change-Id: Ia60d755fb3bc51c855782fcbef3c14d7c511caff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Pat Manning
2022-05-12 17:17:35 +00:00
committed by Automerger Merge Worker
4 changed files with 168 additions and 32 deletions
@@ -66,9 +66,9 @@ public class OverviewState extends LauncherState {
@Override
public ScaleAndTranslation getWorkspaceScaleAndTranslation(Launcher launcher) {
RecentsView recentsView = launcher.getOverviewPanel();
float workspacePageWidth = launcher.getDeviceProfile().getWorkspaceWidth();
float workspacePageHeight = launcher.getDeviceProfile().getCellLayoutHeight();
recentsView.getTaskSize(sTempRect);
float scale = (float) sTempRect.width() / workspacePageWidth;
float scale = (float) sTempRect.height() / workspacePageHeight;
float parallaxFactor = 0.5f;
return new ScaleAndTranslation(scale, 0, -getDefaultSwipeHeight(launcher) * parallaxFactor);
}