Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
对于超时偏好,我需要向用户询问一个数字。android上是否有一些“数字控制”,或者我是否必须使用文本输入并检查用户给出的文本是否为数字?非常感谢你!
在文本框的图形布局视图中,您可以选择 Properties>Input Type>Number,或者在 xml 视图中,您可以将“android:inputType="number"”添加到 EditText
试试这个到你的编辑文本字段..这将只接受数字..
android:inputType="number"
将此属性添加到您的编辑文本中..