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

[RatingBar] Request: offer a new class instead of what we have of RatingBar, being able to have width and/or height boundaries for it, to let it scale accordingly to them #4258

Open
AndroidDeveloperLB opened this issue Aug 12, 2024 · 0 comments

Comments

@AndroidDeveloperLB
Copy link

AndroidDeveloperLB commented Aug 12, 2024

Is your feature request related to a problem? Please describe.
Yes. Currently all we can do is either use a large one of a small one by styles:

style="?android:attr/ratingBarStyleSmall"

style="?android:attr/ratingBarStyle"

But if you want it to be smaller/larger, you can't do it using normal ways like on other Views.

I think it's time for this to be more flexible and consistent with the rest of the Views.

Describe the solution you'd like
Be able to make it auto-scale according to the width and/or height that we enforce to it, just like any other View, such as ImageView, etc...
Not to mention it ruins the View itself (if you make it smaller by half, it reaches a point it shows 3 stars instead of 5, for example).

Describe alternatives you've considered
We can use "scaleX" and "scaleY", but those aren't recommended for this, and you lose the point of using real dimensions and constraints this way.

Additional context
Can be useful for native ads, for example:
https://support.google.com/admob/answer/6329638#zippy=%2Csee-examples-of-each-standard-native-ad-format:~:text=video%20content%20ad-,Native%20app%20install%20ad,-Native%20video%20app

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

No branches or pull requests

2 participants