try to use
float ratingValue = 1.5f;
myRatingBar.setRating(ratingValue); // to set rating value
myRatingBar.setStepSize(ratingValue);// to show to stars
public void setStepSize (float stepSize)
Sets the step size (granularity) of this rating bar.
Parameters
stepSize The step size of this rating bar. For example, if half-star granularity is wanted, this would be 0.5.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…