In Android AutoCompleteTextView only show show dropdown when we entered first letter correctly .What I want is when I enter any letter sequence in the string available it should show the drop down.for example “January” is in my array so when i enter “anu” in AutoComplete field it should show “january” in drop down.Please help.
Thank You
In Android AutoCompleteTextView only show show dropdown when we entered first letter correctly .What
Share
You are likely going to have write your own
Filterand attach it via aTextWatcher. This response has an example of regex in anAutoCompleteTextView: Android AutoCompleteTextView with Regular Expression? and here is another regex/java example: How can I perform a partial match with java.util.regex.*?EDIT: You will need to extend ArrayAdapter in order to override getFilter() and return your custom filter.
So you are going to have something like this: