Deprecated: How to Display Number Keypad for Phone Number Entry in EditText

Deprecated: How to Display number keypad for Phone Number entry EditText

Deprecated in API Level 3, added in API Level 1
Use 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.

2. Add an EditText in the main.xml file.

3. In the main.xml file, add the code below.

<EditText
        ...
android:phoneNumber = "true"
/>

4. Compile and run!
http://developer.android.com/reference/android/widget/TextView.html#attr_android:phoneNumber
http://developer.android.com/reference/android/R.attr.html#phoneNumber