问题
When I am setting progressDrawable to RatingBar its display streched like below image,
xml code is:
<RatingBar android:id="@+id/rating_bar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:isIndicator="true" android:numStars="5" android:progressDrawable="@drawable/ratingstars" android:stepSize="1.0" />
ratingstars.xml
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+android:id/background" android:drawable="@drawable/starfullgray"/> <item android:id="@+android:id/secondaryProgress" android:drawable="@drawable/starfullgray"/> <item android:id="@+android:id/progress" android:drawable="@drawable/starfull"/> </layer-list>
how to set Ratings Star height to wrap_content by any way ??
来源:https://stackoverflow.com/questions/23519712/ratingbar-getting-stretched-when-setting-drawable