Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set ratingbar style from programmatically?

Tags:

android

rating

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

like image 819
d-man Avatar asked Mar 17 '10 08:03

d-man


1 Answers

This works for me (source):

RatingBar rating =
  new RatingBar(context, null, android.R.attr.ratingBarStyleSmall);
like image 190
silver_mx Avatar answered Sep 19 '22 11:09

silver_mx