I have used a RatingBar in my code, but I am having trouble saving the data. Additionally, I am encountering an issue where if I provide a rating for the first row, it is automatically taken as the rating for the seventh row.
I am using the following code:
ratingBar.setOnRatingBarChangeListener(new RatingBar.OnRatingBarChangeListener() {
@Override
public void onRatingChanged(RatingBar ratingBar, float rating, boolean fromUser) {
ratevalue=ratingBar.getRating();
You can use SharedPreference to store rating bar values.
to retrieve the value from shared preference, you can do like this.
Note: you will lose your rating values if you uninstall the app.