splitwise / TokenAutoComplete

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

How to get charsequence of the newly typed letters removing the previously selected tokens. #164

Closed alchemistgo87 closed 9 years ago

alchemistgo87 commented 9 years ago

Suppose I have already added 1 token to the view and now typing letters for new token. While typing new letters how can I retrieve just the new letters in onTextChanged() method?

mgod commented 9 years ago

You can get the current words being entered by calling currentCompletionText. You may need to make a public accessor in your subclass. What are you using this for?

alchemistgo87 commented 9 years ago

Thanks a lot. It worked. I am using this to call a search api which get me the list of suggested tokens.

mgod commented 9 years ago

Awesome. You can also provide an adapter to the view that extends BaseAdapter implements Filterable and the view should automatically handle everything from there.