Faisal khan Faisal khan - 1 year ago 53
Android Question

Set ratingbar style from code

I don't see any method like setStyle for class RatingBar. How can I set the rating style from code?

Answer

This works for me (source):

RatingBar rating =
  new RatingBar(context, null, android.R.attr.ratingBarStyleSmall);