Android: what is the inputType for username
I have an edit text on my
xml layout to allow the user to enter his username,like this:
<EditText android:id="@+id/etUsername" android:layout_width="fill_parent" android:layout_height="wrap_content" android:inputType="" />
which type of
inputType should i use to make the user enter his username, the username contains just letters small letter and capital letter and numbers
2 Solutions collect form web for “Android: what is the inputType for username”
May I suggest
textVisiblePassword|textNoSuggestions it gives you the normal keyboard with the option to display numbers but gets rid of the Android suggestions (they’re pretty useless when typing in a username).
As pointed out by Hailwood, some users may like the added benefit of the suggestions provided by the Android keyboard. Upon reflection on the matter, perhaps a standard
text might be more suited for this situation.
It’s really a UX matter, you’ll have to make a choice here.
I would recommend
android:inputType="textVisiblePassword|textNoSuggestions" as some IME/Android-Version combinations seem to ignore
textNoSuggestions but not
textVisiblePassword. If suggestions are left on some IME will auto insert spaces or other punctuation and auto-capitalize text which can screw up logins.