I am following the standard example of how to add a RatingBar. To control the number of stars I tried to use android:numStars=\"5\". The problem is
To show a simple star rating in round figure just use this code
public static String getIntToStar(int starCount) {
String fillStar = "\u2605";
String blankStar = "\u2606";
String star = "";
for (int i = 0; i < starCount; i++) {
star = star.concat(" " + fillStar);
}
for (int j = (5 - starCount); j > 0; j--) {
star = star.concat(" " + blankStar);
}
return star;
}
And use it like this
button.setText(getIntToStar(4));