EditText with number keypad by default, but allowing alphabetic characters

Define your EditText in your xml this way:

<EditText 
    android:id="@+id/txtOppCodigoCliente"
    android:inputType="textVisiblePassword"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:maxLength="11"
    android:hint="@string/strCodigoCliente"/>

output:
android:inputType=”textVisiblePassword”

A row of numbers and the rest of letters.

Leave a Comment