The following code produces an EditText (target version 23). I've been working on this for about 8 hours, and have received some suggestions, but I don't think anyone has ever seen this before, so I remain stuck.
- Click on the field.
- The A/N soft keyboard opens up.
- Click the 123? button at bottom left. The numeric soft keyboard opens up.
- Press any digit. Nothing happens.
- Long press 5, "5/8" gets added into the text field.
- Press any special character, such as @. It might add to the field.
- Clear the field. Type "for", press 123?, now it will take digits.
- Clear the field. Type "for?", press 123?, it will not take digits.
I added a TextWatcher. If the digits didn't post, the TextWatcher didn't see them either.
EditText bottomT = new EditText(model);
bottomT.setTextSize(14);
bottomT.setHint("ZIP");
bottomT.setHintTextColor(Color.BLACK);
bottomT.setBackgroundColor(Color.WHITE);
bottomT.setTextColor(Color.BLACK);
// bottomT.setInputType(InputType.TYPE_CLASS_NUMBER) Didn't make any difference.
// bottomT.setRawInputType(InputType.TYPE_CLASS_NUMBER) Didn't make any difference.
// bottomT.setText("", TextView.BufferType.EDITABLE); DIdn't make a difference
bottomT.setText("");