I have a little problem when using custom bar style. I read other topics on this, but the proposed solutions / answers do not solve the problem.
Android seems to stretch part of the star image, creating this strange effect:
This strange effect is even noticeable in the eclipse graphic layout preview tool:
Star "sprites": and
This is custom style:
<style name="ratingBar" parent="@android:style/Widget.RatingBar"> <item name="android:progressDrawable">@drawable/rating_bar</item> <item name="android:minHeight">@dimen/ratingBarHeight</item> <item name="android:maxHeight">@dimen/ratingBarHeight</item> </style>
And this is the xml code in the layout:
<RatingBar android:layout_width="wrap_content" android:layout_height="@dimen/ratingBarHeight" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:numStars="5" android:stepSize="1.0" style="@style/ratingBar" />
The height is determined as follows:
<dimen name="ratingBarHeight">32dip</dimen>
source share