Ask user for a number / integer value
For a timeout preference I need to ask the user for a number. Is there some kidn of "number control" on android or do I have to use a text input and check if the text given by the user if a number? T开发者_如何学运维hank you very much!
In the graphical layout view for the textbox you can select Properties>Input Type>Number or in the xml view you can add "android:inputType="number"" to the EditText
try this to your edit text field.. this will accept only number..
android:inputType="number"
add this property to your edit text..
精彩评论