Ayush Goyal
Ayush Goyal

Reputation: 2079

Display dialer keypad in my application for inputType = number?

I have an editText which is set to accept numbers only, as expected the keyboard pops up to input numbers but its the one which also has @, & #, etc. I want to display the keypad which we have in a default dialer which is used to enter phone number to call. That one is much easier to use when the motive is to enter only numbers. Is there any way to do it?

Upvotes: 1

Views: 783

Answers (2)

Aprian
Aprian

Reputation: 1728

android:inputType="phone" should do what you want.

Upvotes: 2

SBJ
SBJ

Reputation: 4139

Set Edit Text Property as per your requirement like...

android:inputType="numberDecimal"

android:inputType="number"

android:inputType="phone"

Upvotes: 1

Related Questions