SearchableSpinner
SearchableSpinner copied to clipboard
Library doesn't support Custom Filter for ArrayAdapter
Hello, first for all, sorry for my bad English.
Ok, straight to the point. The type of my adapter for the spinner is a project class (e.g. ArrayAdapter<Item>), witch contains two attributes, id (int) and name (String). So I implemented a subclass of ArrayAdapter for a custom filter, because the default filter isn't useful for me, since in my native language (Spanish), there are words with special characters and the filter only works when the text to search matches the beginning of the word.
I've been researched your source code and I realized that ListAdapter for inner ListView of search dialog is built with a generic ArrayAdapter created from the List of items of Dialog class. This causes the filter of my custom Adapter not recognized and the adapter tooks the default instead.
I wish that ListAdapter of inner ListView is created from the custom Adapter in the method setAdapter
of class SearchableSpinner
I wait for your early reply. I'd be really useful for me. Thanks.
I have the same problem as I wanted the filter to be more like contains()
instead of startsWith()
.
@azabost can you solved this?
@miteshpithadiya please fix this
maybe this will help https://stackoverflow.com/questions/42507097/issue-in-searchable-spinner-adapter-android