0

In the AutocompleteTextView, the results will only show if the first number/text entered, matches with the firt number/text in the list provided.

For example consider a list:

 String[] items = new String[]{"021023032", "024345244", "024566545245"};

The Autotext results will show up only if the first number entered is 0 or else it won't. I got a use case where if the user enters 0 or any other number the results should show. I tried 'showDropDown()' using textwatcher, setting threshold but still it only shows if the first number is 0. Any suggestions to try?

krish
  • 237
  • 4
  • 14

1 Answers1

0

the defualt autocomplete text view works in this only way, but you can create your own widget, it's very simple you need to extend a view from text view and create a regex and a handler, in text watcher handle if the text matches with your regex or not and if yes show dropdown.

saeedata
  • 901
  • 6
  • 14