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

  • Large Icon Bitmap appears as white square in notification?
  • Android - Activity Home/Up arrow has additional padding/margin with SDK 24
  • How to disable BottomNavigationView shift mode?
  • Android Studio - Run signed apk on emulator
  • More than one BroadcastReceiver for the same Intent with contradictory doc and practice
  • how to send http request using http header
  • Related posts:

    Android Using layer-list for button selector
    Is it okay if we override OnDestroy() method in every activity of Android Application?
    Applying setRotation to Maps API v2
    @Override annotation error (android prefs)
    Null Pointer exception starting IntentService
    Download maps for osmdroid
  • Cordova auto update application folder
  • Increase the value of a record in android/sqlite database
  • after configuration change fragment from backstack is now sharing the FrameLayout?
  • ADB disconnecting after a few minutes
  • Retrofit 2: responseBodyConverter converts to null object
  • Emulator not running OpenGL app which messages “Unfortunately, OpenGL ES 2.0 Basic has stopped”
  • 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).

    EDIT:

    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.

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.