Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Email keyboard for edit text

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);

like image 525
Sreekanth Karumanaghat Avatar asked Jun 26 '12 09:06

Sreekanth Karumanaghat


People also ask

How do you use editable text on android?

If you set android:editable="true" you can access the TextView via the D-pad, or you could add android:focusableInTouchMode="true" to be able to gain focus on touch. The problem is you cannot modify the existing text, and you cannot move the cursor. The text you write just gets added before the existing text.

How do I turn off edit text on android?

What should I set to disable EditText? It's possible to preserve both the style of the view and the scrolling behaviour. To disable an EditText while keeping this properties, just use UI. setReadOnly(myEditText, true) from this library.


1 Answers

Add this to your layout:

android:inputType="textEmailAddress"

like image 122
agamov Avatar answered Sep 23 '22 10:09

agamov