Skip to content

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

Open

Description

@Nanamare

Description

When CircularDrawingDelegate.drawArc() draws a full circle (360°) track, there is a visible seam artifact at the 0° position where the start and end points overlap.

Root Cause

drawArc() always has a start/end point. When cornerRadius > 0:

  • With Cap.ROUND: Two round caps overlap at 0°, creating a visible bump
  • With drawRoundedBlock: Two rounded blocks overlap at the same position

The ROUND_CAP_RAMP_DOWN logic extends the arc beyond 360° to hide caps, but anti-aliasing still produces a visible rendering artifact at the seam.

CircularProgressIndicator.mov

Expected Behavior

A full circle track should render as a perfect circle with no visible seam or artifact.

Proposed Fix

When arcDegree >= 360f and the path is not wavy, use canvas.drawOval() instead of canvas.drawArc(). drawOval has no start/end point concept, so the seam artifact is eliminated entirely.

drawArc (current) drawOval (proposed)
Start/end point Exists (0° seam) None
Cap needed ROUND/BUTT + roundedBlock Unnecessary (BUTT suffices)
360° rendering Cap overlap artifact Perfect circle

Partial arcs (indicators) continue to use the existing drawArc logic unchanged.

Affected Component

CircularDrawingDelegate.java - drawArc() method

Activity

  1. Nanamare commented on Mar 18, 2026

    @Nanamare
    Author

    Additional Context: Reproduction with Theme.Material3.DayNight.NoActionBar

    This artifact is reproducible when using Theme.Material3.DayNight.NoActionBar as the app theme with a CircularProgressIndicator configured as follows:

    <style name="Widget.App.CircularProgressIndicator" parent="Widget.MaterialComponents.CircularProgressIndicator">
        <item name="indicatorInset">0dp</item>
        <item name="android:indeterminate">true</item>
        <item name="trackCornerRadius">8dp</item>
        <item name="trackColor">#1F000000</item>
    </style>

    When trackCornerRadius > 0 and the track draws a full 360° circle, the seam becomes visible at the 0° position. The artifact is most noticeable on the track (not the indicator), since the track is always a complete circle.

    The higher the trackCornerRadius value, the more prominent the artifact becomes — because larger corner radii produce larger caps/rounded blocks that overlap more visibly at the start/end junction.

    This does not depend on the specific theme; any Material3 theme that renders a full-circle CircularProgressIndicator track with a non-zero trackCornerRadius will exhibit this behavior.

  2. added 2 commits that reference this issue on Mar 18, 2026
    352eab9
    4bf0817
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions