tylersuehr7 / chips-input-layout

A customizable Android ViewGroup for displaying Chips (specified in the Material Design Guide).
MIT License
583 stars 63 forks source link

Does something like "onTextChanged"? #12

Closed knkmsht closed 6 years ago

knkmsht commented 7 years ago

I want to implement the chiplist update with the keyboard input.

Is there an example?

tylersuehr7 commented 7 years ago

Hi knkmsht,

The ChipsInputLayout will allow you to set a chip list that is filterable by inputting text from the keyboard input. You can use this feature by aggregating your chips in a List data structure and then setting it in the ChipsInputLayout using the method, setFilterableChipList(List).

For more specific details, check this out: https://github.com/tylersuehr7/chips-input-layout#setting-a-filterable-list-of-chips-in-chipsinputlayout

juandavidGF commented 6 years ago

But isn't it possible to get set an OnTextChanged listener in order to (let's say) fetch a new list of Chips and change the current filterable list?

Have in mind that although the primary use case for this is the fetch mobile contacts example, but there are a lot of cases like fetch a contacts list from an API, an API that you might not want to fetch it entirely in the case you have something like 20,000 contacts, maybe?