I have a bunch of EditTexts in a registration slice.
In KitKat and below, any EditText whose inputType is an email address will use the autocomplete system, which is convenient for users who place their email addresses.
However, on Lollipop (5.0.1 on Nexus 4, for what it's worth), he refuses to use autocomplete. Here is my code for setting input type:
mEditText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS | InputType.TYPE_TEXT_FLAG_AUTO_CORRECT));
The following code, which is just the capital letter of the first letter of each word, and not setting the input as an email address, makes AutoComplete work at all API levels (although the flag that I set for AutoCorrect instead of autocomplete):
mEditText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_WORDS | InputType.TYPE_TEXT_FLAG_AUTO_CORRECT);
which is overly confusing, because looking at the documents for TYPE_TEXT_FLAG_AUTO_CORRECT , it looks like this should actually turn off autocompletion.
TL DR: How the hell do you turn on autocomplete on the Lollipop EditText that you expect to receive via email?
source share