Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get soft keypad to write email id in edittext in android

Tags:

android

I am using android:phoneNumber to open soft keypad to get phone number in android.I want to open keypad which contains all key required to write email id in edittext.So is there any solution for this(email) like phone number. Thank you

like image 562
kehnar Avatar asked Dec 13 '22 10:12

kehnar


1 Answers

Use textEmailAddress (0x00000021) as defined here: http://developer.android.com/reference/android/widget/TextView.html

In Java code:

 myEditText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);

In XML properties:

 android:inputType="textEmailAddress"
like image 118
Mason Lee Avatar answered May 20 '23 03:05

Mason Lee