Skip to content

[LinearProgressIndicator] Adding track radius causes incorrect progress in the start of the indicator #2940

Closed
@OxygenCobalt

Description

@OxygenCobalt

Description:

Say I set a LinearProgressIndicator to have the following traits:

progressIndicator.progress = positionInMs / 100 // Deci-seconds
progressIndicator.max = durationInMs / 100

This results in a very fine position for the progress indicator.

When there is no track radius set, very low progress amounts (say, 10) look fine:

image

When there is a track radius however, the shown progress is much larger than it should be, presumably to accommodate the track radius (In this example, the track radius is 16dp):

image

Expected behavior:

The progress when there is a track radius should be the same as the progress when there is no track radius. If the progress extent cannot contain the whole track radius, just clip the drawn progress a bit so that it does correctly fit.

I've attached a picture below of what I want:

image

Source code: See above.

Android API version: 33

Material Library version: 1.7.0-beta01

Device: OnePlus 7T running LineageOS

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions