Step size in RatingBar

别来无恙 提交于 2019-12-01 20:22:10

Its nothing but a factor by which you increase ratings on RatingBar. If you want ratings to be displayed like 3.5 or 4.5, you can use stepSize as 0.5. Incase, you want ratings like 3.1 or 4.3, you can have stepSize like 0.1.

Inshort,

stepSize = 1, Ratings = 0, 1, 2, 3, 4, 5, ...

stepSize = 0.1, Ratings = 0.0, 0.1, 0.2, ..., 1.0, ..., 2.0, ..., 5.0, ...

stepSize = 0.5, Ratings = 0.0, 0.5, 1.0, 1.5, 2.0, ..., 5.0, ...

This takes a float value which is the step size of rate increase/decrease. For example, if we set step size to 1.0 then the rating values will be increased/decreased by 1 the less the stepSize, the more presice the rating will be.

0.5 stepsize ------- 4.05,3.15,0.05 (ratings)
0.1 stepsize ------- 1.00,2.00,3.00 (ratings)
0.7 stepsize ------- 1.07,2.14,3.21 (ratings)
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!