Fixing task location calculation in seascape

> In seascape, the task is aligned to the left insets

Change-Id: I2bc090698320045a014dc713d57ca412a58bf9e4
This commit is contained in:
Sunny Goyal 2018-05-14 11:08:05 -07:00
parent 99dcc9fd83
commit 55631dd8af
1 changed files with 4 additions and 3 deletions

View File

@ -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) {