I am trying to set a custom color for the small progressbar with this code:
<style name="RatingBar" parent="Theme.AppCompat">
<item name="colorControlNormal">@color/gold_yellow</item>
<item name="colorControlActivated">@color/light_grey</item>
</style>
<RatingBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:isIndicator="true"
android:rating="3.3"
android:theme="@style/RatingBar"
android:id="@+id/go_rating"
style="@android:style/Widget.Holo.Light.RatingBar.Small"/>
The problem with this is this: the stars are small quite alright but they are blue. But If I remove style="@android:style/Widget.Holo.Light.RatingBar.Small
then the color becomes golden yellow but it becomes big.
Please how do I set custom colors for the stars and at the same time make it small?
Use style="?attr/ratingBarStyleSmall"
style:
<RatingBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:isIndicator="true"
android:rating="3.3"
android:theme="@style/RatingBar"
android:id="@+id/go_rating"
style="?attr/ratingBarStyleSmall"/>
see also: https://stackoverflow.com/a/3173594/5183999
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With