Reputation: 1387
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
Upvotes: 4
Views: 2324
Reputation: 5140
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"
Upvotes: 9
Reputation: 21929
use the below code for getting the email soft keyboard
Editetxt email=(EditText)findViewById(R.id.edotetxtemail)
email.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
Upvotes: 2