I want to show a rating bar via an alert dialog in my android app. The problem I am facing is that depending upon the width of the screen, the ratingbar shows more than 5 stars(
setting the width of the RatingBar to "wrap content" solves the whole issue. According to the documentation:
Sets the number of stars to show. In order for these to be shown properly, it is recommended the layout width of this widget be wrap content.