I have an auto complete text view and its max length is defined in xml file as below.
<AutoCompleteTextView
android:id="@+id/autocompleteTextView"
fontPath="font/Roboto-Regular.ttf"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="12"
android:inputType="number"
android:maxLength="12"
android:maxLines="1" />
but when I select values from suggestions based on my input it still allow me to enter more than 12 numbers. I am using text watcher for auto complete suggestions. How to resolve this problem?