Last Updated: February 25, 2016
·
687
· themvrck

Displaying IME for entering email the right way

For 2.3.x and above, when you set the input type on an EditText to InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS to show the keyboard for entering an email, it doesn't work on many devices including Galaxy Nexus.

The right way to do it is this - setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS,);