Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is difference between 'textEmailAddress' and 'textWebEmailAddress'

I noticed that among other attributes, that we can specify for EditText as an inputType, there are two, that look similar:

  1. textEmailAddress
  2. textWebEmailAddress

Google doc has explained very less about this.

We can understand that textWebEmailAddress is something related to HTML or WebView, but I would like to know what exactly, the difference between the two is.

like image 297
Hardik Trivedi Avatar asked Jan 03 '14 06:01

Hardik Trivedi


People also ask

What is inputType in android?

The android:inputType attribute allows you to specify various behaviors for the input method. Most importantly, if your text field is intended for basic text input (such as for a text message), you should enable auto spelling correction with the "textAutoCorrect" value.

What is textPhonetic?

textPhonetic. Text that is for phonetic pronunciation, such as a phonetic name field in a contact entry. Corresponds to TYPE_CLASS_TEXT / TYPE_TEXT_VARIATION_PHONETIC . textWebEmailAddress. Text that will be used as an e-mail address on a web form.

What is signed number in Android Studio?

TYPE_NUMBER_FLAG_SIGNED. Flag of TYPE_CLASS_NUMBER : the number is signed, allowing a positive or negative sign at the start.


1 Answers

Here are some resources I've found regarding these two inputTypes:

... For example, textEmailAddress is a text field where the user will enter something that is an e-mail address ([email protected]) so the key layout will have an '@' character in easy access...

This was found here.

And then:

...You can specify the type of keyboard you want for your EditText object with the android:inputType attribute. For example, if you want the user to input an email address, you should use the textEmailAddress input type...

This was found here.

And the only thing I can find on textWebEmailAddress is:

Variation of TYPE_CLASS_TEXT: entering e-mail address inside of a web form. This was added in HONEYCOMB. An IME must target this API version or later to see this input type; if it doesn't, a request for this type will be seen as TYPE_TEXT_VARIATION_EMAIL_ADDRESS when passed through EditorInfo.makeCompatible(int).

This was found here.

From what I've seen in these sections, there is very little difference in the results, the keyboards are the same, just specified differently for different locations of inputs; one in a web form, one for general-purpose.

Also the textWebEmailAddress is only effective for Honeycomb and newer platforms, while the regular is compatible for all. Although both could be used in older versions, per the documentation, they would operationally be a regular textEmailAddress anyways.

like image 114
TygerTy Avatar answered Sep 20 '22 17:09

TygerTy