dbachelder/CreditCardEntry

Backspace not working on android 5.0.2

Closed this issue · 3 comments

When typing a card number on android 5.0.2 I am unable to delete it.

I can't reproduce. Do you have a sample project to demo the problem? Does the sample app work for you?

Hi I solved the issue already apparently this is a common problem. A bit complicated to explain. To make to story short the bug is in android itself so you have to create you own Input connection instead of using android's default one. This problem depends also on the keyboard inputIME you phone is using (apparently).

The problem is solved here:
http://stackoverflow.com/questions/18581636/android-cannot-capture-backspace-delete-press-in-soft-keyboard/19980975#19980975

Just skip all the explanations and copy and paste the tow classes:

InputConnectionAccomodatingLatinIMETypeNullIssues
EditableAccomodatingLatinIMETypeNullIssues

then implement InputConnectionAccomodatingLatinIMETypeNullIssues in the onCreateInputConnection override and done. I renamed my Input connection InputConnectionNullIssues. Remenber to give values of (this, false) to the Input connection.

oncreateinputcon

Wow... thanks for the info! That's a crappy bug!