Good for example:
Fill four and a half stars
To set the value I do this:
ratingBar.setRating((float) restaurante.getMedia());
When it comes to information such as 4.5
it rounds up thus putting 5 estrelas
ja when I say for example 4.2
it rounds to 4 estrelas
I need it to show in case of 4.1 até 4.9
half star
Within my entidade
restaurante
I have methods GET:SET
private float media;
public float getMedia() {
return media;
}
public void setMedia(float media) {
this.media = media;
}
and thus the return:
restaurante.setMedia(Float.valueOf(jRestaurante.getString("media")));