Deprecated: How to Display number keypad for Phone Number entry EditText
Deprecated in API Level 3, added in API Level 1Use inputType = "phone" instead.
Specifies an input method of a phone number. The number keypad will be displayed. These are allowed to be typed: number, +, -, space, space, (, ), N, comma, *, #, /, and decimal.
(In TextView, the text is turned black while the user is pressing the TextView.)
1. Create an Android project, if you don't already have one.
3. In the main.xml file, add the code below.
...
android:phoneNumber = "true"
/>
4. Compile and run!
Related Articles:
Resources:
http://developer.android.com/reference/android/R.attr.html#phoneNumber