I have an EditText box and I want the default keyboard that comes up when it is selected to be the numeric keypad, since most of the time users will be entering numbers. However, I do want to allow users to enter alphabetic characters too, if they need to. Using android:inputType="number"
restricts input to numeric digits only. What options do I have?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With