material-code-input
material-code-input copied to clipboard
Not accepting characters from some keyboard like samsung default keybaord or AI Keyboard etc
When using key board that comes built in on Samsung mobiles or AI Keyboard the onKeyDown
or onKeyUp
is not triggered at all specially for the number keys. Although the arrow keys and done button on keyboard do trigger the aforementioned methods.
found out that removing the following code will solve the issue to some extent
@Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
outAttrs.actionLabel = null;
outAttrs.inputType = mInputType;
outAttrs.imeOptions = EditorInfo.IME_ACTION_DONE;
return new BaseInputConnection(this, true);
}
it seems that changing return new BaseInputConnection(this, true);
to return new BaseInputConnection(this, false)
also will help to some extent but still there is an issue with BACK or DEL button with some keyboards. This happens to be a bug in Google Keyboard and other third-party keyboards. A work around is available in this StackOverflow Answer
This DOES NOT work in regards to the Samsung 8 and it's keyboard, maybe the Samsung keyboard in general.
I regret so much I ever used this lib....