I have an EditText field whose input type is as follows:
android:inputType="numberDecimal|numberSigned"
But after I type minus as the first character (leading minus sign) and then I try to input digit 2 but it is not taking it. In fact, after leading minus, it is not taking any input (no digits, nothing).
The other fields of EditText xml is below:
android:id="@+id/etAmount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/editText"
android:longClickable="false"
android:inputType="numberDecimal|numberSigned"
android:layout_marginTop="20dp"
Please let me know if there is a solution.
You can define a digits property for your editText and you can set the digits that you want to type only. This will help you.