From 30b4d18bae3d5261f10399a41a6682d80457a408 Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Wed, 8 May 2019 09:19:52 -0400 Subject: [PATCH] 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 --- packages/SystemUI/src/com/android/systemui/qs/TileLayout.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java b/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java index 8aacd725ceb49..14addb99c0c57 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java +++ b/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java @@ -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); } /**