How to make RatingBar to show five stars

前端 未结 18 562
栀梦
栀梦 2020-12-04 18:58

I am following the standard example of how to add a RatingBar. To control the number of stars I tried to use android:numStars=\"5\". The problem is

18条回答
  •  星月不相逢
    2020-12-04 19:30

    The actual thing over here is to use wrap_content instead of match_parent. If you will use match_parent the layout will be filled with the stars even if it is more than the numStars variable.

提交回复
热议问题