pchmn / MaterialChipsInput

Implementation of Material Design Chips component for Android
Apache License 2.0
2.63k stars 382 forks source link

Add chip manually when enter is pressed on keyboard #116

Open akhilbv1 opened 6 years ago

akhilbv1 commented 6 years ago

How can i add a chip manually when i enter text which is not in the list.

mwshubham commented 5 years ago

I guess you need to add a text watcher on edit-text of chip-input whenever user enter space just add the text as a form of chip chips_input.addChip(ClassExtendingChipInterface(inputFormChipInput))

nitinnatural commented 5 years ago

but with chips_input.addChip() replaces chips which are already there.

mwshubham commented 5 years ago

It doesn't unit there is some chip validator added e.g. chips_input.setChipValidator { _, _ -> false } This result in adding duplicated.