Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ProgressIndicator] Make possible to extends Linear or Circular progress indicator #2361

GerardPaligot opened this issue Sep 8, 2021 · 4 comments


Copy link

Is your feature request related to a problem? Please describe.
In my Android Design System, I'm creating a subclass for all material classes to extend the material implementation but CircularProgressIndicator and LinearProgressIndicator are final classes.

Describe the solution you'd like
Just remove the final keyword on these classes.

Describe alternatives you've considered
Create my own custom view to configure a circular or linear progress view but I would like to avoid this solution.

Copy link

drchen commented Sep 21, 2021

Can you provide more details about why you need to extend progress indicators?

One or two use case examples will be better. Thanks!

Copy link

Yes, I have two reasons:

  1. I would like to avoid a dependency to Material Components for Android applications which use our Design System. In the future, if we need to change the implementation of one component, we can keep our Kotlin class to abstract the Material Component, change its implementation and avoid any changes for our consumers.
  2. For some components, we provide several variants of the same component. To do that, we create a custom style for each variant, a reference for each style and a Kotlin class which bind the variant and a style reference for each variant. Unfortunately, because Linear/Circular progress bar are final classes, I can't do that.

If I'm not clear, I can give you some piece of code if needed.

Copy link

drchen commented Nov 2, 2021

Makes sense to me. Thanks for your explanation. I'll raise this to the team. Feel free to just create a PR, which will make things move faster I guess. : )

ekager added a commit to ekager/material-components-android that referenced this issue May 19, 2023
Copy link

ekager commented May 19, 2023

We have the same issue. We are trying to build custom components based on Material Components and need to be able to extend these classes to do so. Opened a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

4 participants