Merge "Use grid Rect when calculating clear all position" into sc-dev

This commit is contained in:
Alex Chau authored and Android (Google) Code Review committed 2021-03-15 18:24:08 +00:00
commit 510fc67c55
1 file changed
+3 -3
@@ -1625,12 +1625,12 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
float clearAllShorterRowCompensation =
mIsRtl ? -shorterRowCompensation : shorterRowCompensation;
// If the total width is shorter than one task's width, move ClearAllButton further away
// If the total width is shorter than one grid's width, move ClearAllButton further away
// accordingly.
float clearAllShortTotalCompensation = 0;
float longRowWidth = Math.max(topRowWidth, bottomRowWidth);
if (longRowWidth < mTaskWidth) {
float shortTotalCompensation = mTaskWidth - longRowWidth;
if (longRowWidth < mLastComputedGridSize.width()) {
float shortTotalCompensation = mLastComputedGridSize.width() - longRowWidth;
clearAllShortTotalCompensation =
mIsRtl ? -shortTotalCompensation : shortTotalCompensation;
}