I want to set progressDrawable to a RatingBar. I was able to do this using (layer-list) via xml. Here is my layout ....
<RatingBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stepSize="0.5"
android:rating="3.0"
android:id="@+id/ratingbar_default"
android:progressDrawable="@drawable/star_rating_bar_full"
/>
Here is my star_rating_bar_full
where star2 and star1 are images for specifying rated star and unrated star.
The output was fine and the RatingBar looked great. I was able to rate also. Now i want to apply the same logic dynamically using LayerDrawable
I have tried to use the following answer Dynamic RatingBar. I was able to display the RatingBar but the edges were cut at the right side of Rating Bar. The functionality was working fine but this is the only problem i am facing.
Any ideas ??? Why the rating bar edges has been cut of at right side.