From d62e14e539588f99dff48a67a140153c6d92e265 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Wed, 16 May 2018 15:45:13 -0700 Subject: [PATCH] Fixing taskView not centered properly in available width Bug: 79756414 Change-Id: Iec6b22f96f883d61f430599e34ff9ebe91d91924 --- quickstep/src/com/android/quickstep/util/LayoutUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/util/LayoutUtils.java b/quickstep/src/com/android/quickstep/util/LayoutUtils.java index 574efffb73..ec9c7eaed9 100644 --- a/quickstep/src/com/android/quickstep/util/LayoutUtils.java +++ b/quickstep/src/com/android/quickstep/util/LayoutUtils.java @@ -104,7 +104,7 @@ public class LayoutUtils { float outHeight = scale * taskHeight; // Center in the visible space - float x = insets.left + (taskWidth - outWidth) / 2; + float x = insets.left + (launcherVisibleWidth - outWidth) / 2; float y = insets.top + Math.max(topIconMargin, (launcherVisibleHeight - extraVerticalSpace - outHeight) / 2); outRect.set(Math.round(x), Math.round(y),