Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android:inputType="textEmailAddress" - '@' key and a '.com' key?

I'm having an EditText where I set the inputType="textEmailAddress". My understanding is that this should bring up a soft keyboard that's more suitable for email address entry.

In the blog entry for IMF Android IMF there is a particular image shown for composiong email where the soft keyboard consists of '@' key for email address entry.

But in this particular answer the displayed soft keyboard shows a '.com' key besides the '@' key.

Is this '.com' key a default key with android:inputType="textEmailAddress"? Or is there some setting involved?

like image 558
yjw Avatar asked Mar 26 '11 04:03

yjw


2 Answers

There is no "default" really. android:inputType is merely a hint for your IME. Now that IME could be the stock Android 1.1 keyboard, the Android 2.0 keyboard, the HTC Sense keyboard, SwiftKey, Swype, you name it. Each one can decide for itself whether or not to add a ".com" key (or to entirely ignore inputType).

like image 156
EboMike Avatar answered Nov 15 '22 13:11

EboMike


Try this, it might help you

editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
like image 25
Jithu Avatar answered Nov 15 '22 12:11

Jithu