I have a requirement to rate for a user with minimum of one star and after that ratings should increase to 0.5. But my question is that the user should not change the minimum rating of star to 0.5 or 0. 1 should be the default rating. Please help with this and awaiting for your earlier response. I also tried implementing by listeners from the link but completely struct with the logic inside My code is:
ratingBar.setOnRatingBarChangeListener(new OnRatingBarChangeListener() {
@Override public void onRatingChanged(RatingBar ratingBar, float rating,
boolean fromUser) {
}
});
ratingBar.setOnRatingBarChangeListener(new OnRatingBarChangeListener() {
@Override public void onRatingChanged(RatingBar ratingBar, float rating,
boolean fromUser) {
if(rating<1.0f)
ratingBar.setRating(1.0f);
}
});