Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set lower limit of number of stars shown in RatingBar Android

With the RatingBar widget in android you can set the number of stars to be show, but is there a way of setting a lower limit on the number of stars that are always active. As an example rating a film or something where you cannot submit a rating of 1?

like image 762
SamRowley Avatar asked Dec 07 '22 19:12

SamRowley


1 Answers

If this is not possible in the framework strictyl speaking, you could put a default value of 1 with android:rating set to 1, and the add a listener on the RatingBar to go back to 1 when the user tries to go lower no?

like image 84
Sephy Avatar answered Dec 10 '22 12:12

Sephy