MaterialChipsInput icon indicating copy to clipboard operation
MaterialChipsInput copied to clipboard

getEditText return new instance

Open mariciv opened this issue 7 years ago • 8 comments

You are not able to reference the editText used for entering the input. This means I can't add extra TextWatcher nor can I get the current text input.

mariciv avatar Jun 13 '17 10:06 mariciv

Also it is not possible to disable Edittext and solve autofocus problems. Do you think this will be fixed or should I make a fork?

PS: nice lib! thanks!

mathias21 avatar Jul 30 '17 22:07 mathias21

Hi @mariciv, @pchmn

I've created a PR with a fix to the EditText new instance problem. Please have a look. This is a temporary fix and I would recommend to move the EditText initialisation to the View layer, instead inside of the adapter. This will be, ofc, up to @pchmn ;)

mathias21 avatar Jul 31 '17 10:07 mathias21

Is there any chance for this gets merged or fixed in some other way? @pchmn

mariciv avatar Aug 25 '17 14:08 mariciv

in case you don't wanna wait to PR or Fork the project you can use this trick to get the actual ChipInputEditText

@BindView(R.id.configuration_mails)
ChipsInput editMails;

RecyclerView recyclerView = (RecyclerView) editMails.findViewById(R.id.chips_recycler);
ChipsInputEditText chipsInputEditText = (ChipsInputEditText(recyclerView).getChildAt(recyclerView.getChildCount() - 1);

TitusCln avatar Nov 16 '17 16:11 TitusCln

@TitusCln you are doing dirty things! but I like it ;)

mathias21 avatar Mar 13 '18 15:03 mathias21

in case you don't wanna wait to PR or Fork the project you can use this trick to get the actual ChipInputEditText

@BindView(R.id.configuration_mails)
ChipsInput editMails;

RecyclerView recyclerView = (RecyclerView) editMails.findViewById(R.id.chips_recycler);
ChipsInputEditText chipsInputEditText = (ChipsInputEditText(recyclerView).getChildAt(recyclerView.getChildCount() - 1);

this is not working, is there any way to add a contact manually after pressing enter key

midhun-murali avatar Nov 26 '18 12:11 midhun-murali

@pchmn any reason this has not been merged yet? is there any other solution apart from the suggested one above ?

ajay-nagarajan avatar Dec 18 '18 07:12 ajay-nagarajan

Hi @ajay-nagarajan You can always pull from the PR I did with a temporary fix. https://github.com/pchmn/MaterialChipsInput/pull/51

mathias21 avatar Dec 25 '18 00:12 mathias21