diff options
author | 2025-03-18 12:24:45 -0700 | |
---|---|---|
committer | 2025-03-18 12:38:41 -0700 | |
commit | 00cde3149bd469f47ebd5c0b5bf60f4937b47f50 (patch) | |
tree | 075ec73913408b87add84c9c10a27eff28a1ca3e /src | |
parent | 6aaec1a019f5d750e7540c0357193cf32df34947 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/pageindicators/PageIndicatorDots.java | 7 |
1 files changed, 7 insertions, 0 deletions
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); |