Reputation: 3403
The following Code doesn't seem to work,I want the email keyboard with @
and .com
to get displayed for the edit text.
emailEditText.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
Upvotes: 44
Views: 29950
Reputation: 579
In Kotlin way:
email_field.valueEditText.inputType = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS
Upvotes: 1
Reputation: 3403
Well I found the solution which is to use
emailEditText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
Upvotes: 78