1
Good precise for example:
Fill 4 and a half stars
To set the value I do so:
ratingBar.setRating((float) restaurante.getMedia());
When information comes from for example 4.5
he rounds up putting like this 5 estrelas
when I’m already in charge for example 4.2
he rounds to 4 estrelas
I need you to show me in case 4.1 até 4.9
half star
Inside my entidade
restaurante
have the methods GET:SET
private float media;
public float getMedia() {
return media;
}
public void setMedia(float media) {
this.media = media;
}
and so the return:
restaurante.setMedia(Float.valueOf(jRestaurante.getString("media")));
Tried using Float.parseFloat?
– Nayron Morais
No, I’ll try here and tell you
– Renan Rodrigues
@Nayronmorais so in case ? ratingBar.setRating(Float.parseFloat(String.valueOf(restaurant.getMedia())));
– Renan Rodrigues
If it’s like this, it didn’t work
– Renan Rodrigues