Fix TileLayout#onMeasure

The width value for setMeasuredDimension was wrong, as it was adding the
padding, which was already included as this is the width we get from the
parent. This caused each TilePage in PagedTileLayout to be 8dp wider
than the container and then they overlapped at the edges, appearing in
the next page.

Test: visual using showLayoutBounds
Test: manual using Talkback, previous page not focused
Fixes: 132048870
Change-Id: Idd5d4567cfe25dd1e11a02995286a29606eac6e0
This commit is contained in:
Fabian Kozynski
2019-05-08 09:19:52 -04:00
parent 56c006f5a6
commit 30b4d18bae

View File

@@ -126,7 +126,7 @@ public class TileLayout extends ViewGroup implements QSTileLayout {
(mRows != 0 ? (mCellMarginTop - mCellMarginVertical) : 0);
if (height < 0) height = 0;
setMeasuredDimension(width + getPaddingStart() + getPaddingEnd(), height);
setMeasuredDimension(width, height);
}
/**