How to allow full values (integers) only in ratingbars?

核能气质少年 提交于 2019-12-01 15:35:42

Should be able to use setStepSize() and use a 1.0 to allow increments of 1 star instead of 0.5 for half stars

Here is the docs on it.

ElYeante

It can be set in the xml too, with

android:stepSize="1"

Try to set the Step size like this

ratingBar.setStepSize(1.0);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!