Skip to content

[CircularProgressIndicator] Fix full circle track seam artifact#5028

Open
Nanamare wants to merge 1 commit intomaterial-components:masterfrom
Nanamare:fix/circular-indicator-full-circle-seam
Open

[CircularProgressIndicator] Fix full circle track seam artifact#5028
Nanamare wants to merge 1 commit intomaterial-components:masterfrom
Nanamare:fix/circular-indicator-full-circle-seam

Conversation

@Nanamare
Copy link

@Nanamare Nanamare commented Mar 18, 2026

Summary

  • When CircularDrawingDelegate.drawArc() renders a full circle (360°) track with trackCornerRadius > 0, the start/end caps or rounded blocks overlap at 0°, producing a visible seam artifact
  • Replace drawArc() with drawOval() for full circle tracks — drawOval has no start/end point, so the seam is eliminated entirely
  • Partial arcs (active indicators) continue to use the existing drawArc() logic unchanged
Fix-CircularProgressIndicator.mov

Demo branch

A separate branch with catalog app changes to reproduce and verify the fix:
demo/circular-indicator-seam-reproduction

It includes:

  • Catalog theme switched to Theme.Material3.DayNight.NoActionBar
  • Custom CircularProgressIndicator style with trackCornerRadius=8dp to make the artifact visible
  • Full diff against this PR

Test plan

  • Verify CircularProgressIndicator with trackCornerRadius > 0 renders a seamless full circle track
  • Verify determinate indicator (partial arc) still draws correctly with rounded corners
  • Verify indeterminate animation renders correctly
  • Verify wavy effect paths are unaffected (bypass the drawOval path)
  • Run ./gradlew test — JVM tests pass

Fixes #5027

@google-cla
Copy link

google-cla bot commented Mar 18, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

When drawing a full circle (360°) track, drawArc() creates a visible
seam at 0° where the start/end caps or rounded blocks overlap.

Replace drawArc() with drawOval() for full circle tracks, which has
no start/end point and renders a seamless circle.

Partial arcs (indicators) continue to use drawArc() unchanged.

Fixes material-components#5027
@Nanamare Nanamare force-pushed the fix/circular-indicator-full-circle-seam branch from 352eab9 to 4bf0817 Compare March 18, 2026 15:05
@drchen drchen added the Reviewing Internally An internal change has been created and sent for review. label Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewing Internally An internal change has been created and sent for review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CircularProgressIndicator] Full circle track has seam artifact due to cap overlap at 0°

2 participants