[LinearProgressIndicator] Adding track radius causes incorrect progress in the start of the indicator
See original GitHub issueDescription:
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:
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):
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:
Source code: See above.
Android API version: 33
Material Library version: 1.7.0-beta01
Device: OnePlus 7T running LineageOS
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6 (6 by maintainers)
Top GitHub Comments
Coincidentally, I wanted to create the same issue 😄:
https://user-images.githubusercontent.com/82187521/187311869-c30ffbf3-4335-4e2a-a159-0dea4f21c12c.mp4
Eh, I was just inferring that from what pekingme said about how the library does not clip the progress due to how the base progress class needs to accommodate the circular progress indicator as well, which has no defined “start” or “end” and makes such clipping more difficult.