如何只在等级栏中允许完整值(整数)? [英] How to allow full values (integers) only in ratingbars?

查看:91
本文介绍了如何只在等级栏中允许完整值(整数)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的客户想要在其中一项活动中使用评分栏,但他不希望它允许使用半星(又称浮动)值.我一直在谷歌搜索,但一无所获.有人知道是否有可能迫使等级栏不允许半星吗?

My client wants a ratingbar in one of the activities, but he doesn't want it to allow half-stars (aka float) values. I've been google-ing around but found nothing about it. Does anybody know if it is possible to force the ratingbar to not allow half-stars?

谢谢.

推荐答案

应该能够使用 setStepSize()并使用 1.0 允许增加1星 0.5 表示半颗星

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

此处是其中的文档.

这篇关于如何只在等级栏中允许完整值(整数)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆