zhanghai / MaterialProgressBar

Material Design ProgressBar with consistent appearance
Apache License 2.0
2.21k stars 279 forks source link

Add ability to change circular progressbar width #61

Closed ursusursus closed 7 years ago

ursusursus commented 7 years ago

Hi, please add this option , I am making a button with icon in center and circular progressbar around it, and it visually looks bad when progressbar is different width than lines in icon. Afaik I can tell you scale the cancas with width, but Id like to set fixed width

zhanghai commented 7 years ago

If you mean the stroke width, sorry but this is against the Material Design guidelines so it won't be implemented here.

But just FYI, you can always copy the implementation and change the value in BaseSingleCircularProgressDrawable.

ursusursus commented 7 years ago

Google Play uses this. Maybe consider the class to be more easily extended rather than code copying. Now as I see it, I have to extend BaseProgressLayerDrawable, which takes the drawable array as ctor argument, so thereforce I have to copy BaseSingleCircularProgressDrawable, SingleCircularProgressDrawable, CircularProgressBackgroundDrawable and same goes for extending IndeterminateHorizontalProgressDrawable, which you really cant as drawRing is private etc.

ursusursus commented 7 years ago

2017-07-04 08 43 55 2017-07-04 08 45 34

ursusursus commented 7 years ago

and BaseIndeterminateProgressDrawable is package private so yeah this is not feasibly right now

zhanghai commented 7 years ago

You can always drop your class into package of this library, a hack popular with support libraries.

ursusursus commented 7 years ago

I know, but I feel it should be a feature of the library, see Google uses it, you can deviate from guidelines when there is a purpose

Tolriq commented 5 years ago

@DreaminginCodeZH could you reconsider this feature requests?

While it works in Java, Kotlin is more strict and prevent overriding any of the classes due to (public function exposes its internal return type in Kotlin error and all the package private / protected stuff)