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 authored and Automerger Merge Worker committed 2022-05-12 17:17:35 +00:00
commit a046ec4a33
4 files changed
+168 -32

No files matched your search

@@ -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);
}