Faisal khan Faisal khan - 5 months ago 14
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);
Comments