Type for text android

Which one is correct inputTypefor emailin an EditText?

<EditText
  android:id="@+id/email"
  android:layout_width="200dip"
  android:layout_height="wrap_content"
  android:layout_below="@+id/textEmail"
  android:inputType=""/>
+5
source share
2 answers

You do not need it, by default it is normal. You need only the input type, if special behavior is required - only numeric data, password, etc.

Edit: if you want to get an email address, use textEmailAddress, like the others. The body of the letter I am reading may be the default. Subject has textEmailSubject, but tends to be ignored.

+2
source
android:inputType="textEmailAddress"

If you press Ctrl+ Spacein Eclipse, it will open a menu of available options and narrow them down as you type.

+9
source

All Articles