Make your own RatingBar on Android
The default RatingBar on Android is ugly and too big for most occasions. So, I decided to design my own.
All you'll need is a decent graphic editor to make the rating stars (actually, anything; you can even make thumbs up and use those instead of stars).
Alternatively, like me, you can download Android Stencils and Sources and take the star stencil from there; its perfect.
1. Create two graphic file in .png format. One image should be of a filled star and the other non-filled. Remember to make the background transparent.
2. Place these two file into the drawable folder, found in /res.
3. Create an xml file in the drawable folder and put the following code into it:
4. Add the following code into styles.xml file, found in "values" folder. Place the code inside "resources" tag
5. In the layout file, where you are defining your RatingBar, add the following argument into the <RatingBar> tag:
style="@style/style_name"
Here, "style_name" is the same as the one defined as name = "style_name" under the <style> tag in the styles.xml file.