I'm making a quiz app in Android Studio, and I want to add a RatingBar in the quiz result screen. Let's say I got 2 questions correct out of 3 questions and it will show that my mark is 2 on the result screen but I also wantit to fill 2 stars of the RatingBar. The questions I've seen so far is all the reverse way of what I want to do, you usually click on the star and it shows the rating but I want to do opposite
Asked
Active
Viewed 1,684 times
2 Answers
0
<RatingBar
android:id="@+id/ratingbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:isIndicator="true"
android:numStars="3"
android:stepSize="1" />
In activity: ratingBar.setRating(2.0);

sj_8
- 173
- 1
- 16