I'm using an EditText Field in my app where the user can specify an amount of money.
I want to set that user can not enter more than 1000000 money.
Is there a way to limit the value?
I'm using an EditText Field in my app where the user can specify an amount of money.
I want to set that user can not enter more than 1000000 money.
Is there a way to limit the value?
you can use in java
editText.setFilters(new InputFilter[]{new InputFilter.LengthFilter(maxLength)});
or in xml
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:maxLength="13"/>