Search code examples
javaandroidratingbar

How to set double value as rating in rating bar?


How to set double value in rating bar, i have search there is no method which works on a double value. I also no there is no chance to convert double to float.


Solution

  • use it String ratedValue = String.valueOf(ratingBar.getRating());

                rateMessage.setText("Rating : " + ratedValue + "/5");