How to make RatingBar to show five stars

前端 未结 18 544
栀梦
栀梦 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:18

    I found that the RatingBar stretched to a maximum number of stars because it was enclosed in a Table with the attribute android:stretchColumns = "*".

    Once I took stretchCoulumns off all columns, the RatingBar displayed according to the android:numStars value

提交回复
热议问题