I need a editText input type that allows me to increase the experience of the user when he/she is entering a bank account or bank branch. The numbers should follow those rules:
Account: \d{1,5}-\d{1,2}|X --> one to five numeric digits, dash, one or two numeric digits or one X character
Branch: \d{1,5}(-\d{1,2}|-X)? --> one to five numeric digits, dash, zero, one or two numeric digits or one X character
As my entry have likely more numeric digits I want the keyboard to offer numbers primarily, and if the user have a X digit he/she can swap the input type. Basically I want a keyboard whose symbolic layout is displayed first.
UPDATE:
I tried changing the input type in the edit text xml:
<EditText
style="@style/Subhead.Form"
android:inputType="text"
android:maxLength="7"
app:hint="@{@string/profile_hint_bankBranch}"
app:bindTo="@{viewModel.branch.input}"
tools:text="1234-5"/>
But this presents the text layout first, as expected, I also tried several other options but I think that none does what I want.
In iOS I'm using the "Numbers and punctuation" keyboard type, that does exactly what I want, is there any easy solution to have the same behaviour?