splitwise / TokenAutoComplete

Gmail style MultiAutoCompleteTextView for Android
Apache License 2.0
1.3k stars 384 forks source link

Filter recyclerview data on text change #359

Closed d3bt3ch closed 6 years ago

d3bt3ch commented 6 years ago

I want to filter a recyclerview data on text change. I did a hack by implementing TextWatcher interface and adding a textwatcher to 'TokenAutoComplete'. But i am getting a weired behaviour. The parital text remains on field even after adding the token.

This is much required feature and can you add one more method to the 'TokenListener' or create an interface for text change which we can capture in our activity.

Note: I dont want a popup selector with TokenAutoComplete by using the TokenAutoComplete setAdapter.

mgod commented 6 years ago

Unfortunately, I don't think this is behavior we can support in the library. The underlying Android AutoCompleteTextView implementation is pretty solidly tied to the list view popup and the related adapter and I'd need to reimplement a lot of that to support recycler views. I'm guessing this would at least double the size of the library. Can you give me some more details on why you can't use the popup and what you're trying to accomplish in more detail? There are some alternatives to this library that might fit your needs better or I might be aware of a better solution in the library for your use-case.