From 00cde3149bd469f47ebd5c0b5bf60f4937b47f50 Mon Sep 17 00:00:00 2001 From: Stefan Andonian Date: Tue, 18 Mar 2025 12:24:45 -0700 Subject: Fix PageIndicatorDots Outline Invalidate the outline when a Folder or WidgetPicker's PageIndicatorDots become visible with 0 scroll. Necessary to avoid stale Outlines which appear as grey shadows. Bug: 394355070 Test: Verified manually that this works well, and looks great in LTR mode and RTL mode. Flag: com.android.launcher3.enable_launcher_visual_refresh Change-Id: I3e730b1109b9cd05e25454865f7e97df2078725b --- src/com/android/launcher3/pageindicators/PageIndicatorDots.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/com/android/launcher3/pageindicators/PageIndicatorDots.java b/src/com/android/launcher3/pageindicators/PageIndicatorDots.java index 211263835c..1b23fb4fd5 100644 --- a/src/com/android/launcher3/pageindicators/PageIndicatorDots.java +++ b/src/com/android/launcher3/pageindicators/PageIndicatorDots.java @@ -566,6 +566,13 @@ public class PageIndicatorDots extends View implements Insettable, PageIndicator } if (Math.round(mCurrentPosition) == i) { sLastActiveRect.set(sTempRect); + if (mCurrentPosition == 0) { + // The outline is calculated before onDraw is called. If the user has + // paginated, closed the folder, and opened the folder again, the + // first drawn outline will use stale bounds. + // Invalidation is cheap, and is only needed when scroll is 0. + invalidateOutline(); + } } canvas.drawRoundRect(sTempRect, mDotRadius, mDotRadius, mPaginationPaint); -- cgit v1.2.3-59-g8ed1b