Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

type for email text android

what's the correct inputType for email in EditText?

<EditText
  android:id="@+id/email"
  android:layout_width="200dip"
  android:layout_height="wrap_content"
  android:layout_below="@+id/textEmail"
  android:inputType=""/>
like image 286
wahyu.id Avatar asked Feb 19 '13 16:02

wahyu.id


2 Answers

android:inputType="textEmailAddress"

If you hit Ctrl + Space in Eclipse then it will bring up the menu of options available and narrow them down as you type.

like image 77
TronicZomB Avatar answered Sep 19 '22 00:09

TronicZomB


You don't need one, the default is fine. You only need an input type when you want special behavior- numeric only, password, things like that.

Edit: if you want an email address, then use textEmailAddress as others suggested. The body of an email, which is how I read the question, can be default. Subject has textEmailSubject, but tends to be ignored.

like image 39
Gabe Sechan Avatar answered Sep 18 '22 00:09

Gabe Sechan