From 55631dd8afbc52c83c50a5ade0fe28a454d86862 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Mon, 14 May 2018 11:08:05 -0700 Subject: Fixing task location calculation in seascape > In seascape, the task is aligned to the left insets Change-Id: I2bc090698320045a014dc713d57ca412a58bf9e4 --- quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'quickstep') diff --git a/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java b/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java index 14b40467f..a25b77d3d 100644 --- a/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java +++ b/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java @@ -250,10 +250,11 @@ public class ClipAnimationHelper { taskHeight = taskHeight / 2 - halfDividerSize; } + // Align the task to bottom left/right edge (closer to nav bar). + int left = activity.getDeviceProfile().isSeascape() ? insets.left + : (insets.left + fullDp.availableWidthPx - taskWidth); mSourceStackBounds.set(0, 0, taskWidth, taskHeight); - // Align the task to bottom right (probably not true for seascape). - mSourceStackBounds.offset(insets.left + fullDp.availableWidthPx - taskWidth, - insets.top + fullDp.availableHeightPx - taskHeight); + mSourceStackBounds.offset(left, insets.top + fullDp.availableHeightPx - taskHeight); } public void drawForProgress(TaskThumbnailView ttv, Canvas canvas, float progress) { -- cgit v1.2.3