Android 号码选择器对话框

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3359510/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 09:53:37  来源:igfitidea点击:

Android Number Picker Dialog

androiddialognumbers

提问by Kleptine

Does anyone have any dialogs that will allow a user to pick a number within a certain range? It seems like this would be a fairly common need, but I can't find a common dialog for it and I'd rather not have to spend the time creating my own.

有没有人有任何对话框可以让用户在一定范围内选择一个数字?这似乎是一个相当普遍的需求,但我找不到一个通用的对话框,我宁愿不必花时间创建自己的对话框。

Any help?

有什么帮助吗?

回答by Vitalii Korsakov

I know that more than two years passed but answer is still actual and I find some nice Number Pickers. Here is one of them https://github.com/SimonVT/android-numberpicker

我知道两年多过去了,但答案仍然是实际的,我找到了一些不错的数字选择器。这是其中之一 https://github.com/SimonVT/android-numberpicker

enter image description here

在此处输入图片说明

回答by Krzysztof Wolny

回答by Saad Farooq

A bit late but for any that are interested, http://code.google.com/p/android-wheel/is a good implementation.

有点晚了,但对于任何感兴趣的人来说,http://code.google.com/p/android-wheel/是一个很好的实现。

回答by jfcole

I've just released some code that does just what you want. Check out my custom control, NumberPicker, which can be seen here: http://www.technologichron.net/?p=42

我刚刚发布了一些代码,可以满足您的需求。查看我的自定义控件 NumberPicker,可以在这里看到:http: //www.technologichron.net/?p=42