MaterialChipsInput
MaterialChipsInput copied to clipboard
getEditText return new instance
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.
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!
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 ;)
Is there any chance for this gets merged or fixed in some other way? @pchmn
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 you are doing dirty things! but I like it ;)
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
@pchmn any reason this has not been merged yet? is there any other solution apart from the suggested one above ?
Hi @ajay-nagarajan You can always pull from the PR I did with a temporary fix. https://github.com/pchmn/MaterialChipsInput/pull/51