简体   繁体   中英

What is the best practice to implement user review stars in Android?

What I want to implement is product review stars. I have a score (between 0 and 5) for each product. I want to represent it on 5 stars. For example, if the score is 2.3, first two stars and 30% of the third star will be colored. It seems like a typical task. What's the good practice for this? Thanks!

I would suggest, if you're only doing to .1 precision, just having 10 different images for stars (.1 - 1.0). Aesthetically, you might not want to be that precise without a numeric display.

Also, your question is very broad, could you focus on what exactly you need help with?

If you're looking for a library, you might try AndroidViews .

您可以使用Android小部件RatingBar

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM