I created a Custom Edittext in which I set InputType as this.setInputType(InputType.TYPE_CLASS_NUMBER); but the problem is that it works fine at a level below 7.0 (nougat), but above 7.0 it shows me an alphanumeric keyboard.
Another strange event happened: when I touch EditText, I quickly get a soft numeric keypad, but in less than a second it automatically switches to a regular soft keyboard that displays all the letters. also, when the keyboard is open, and not the back button, than closing the keyboard, but when I again went into Edittext. the keyboard is not open until I click onther edittext and then the current edittext
Is this a problem in Nougat or am I doing something wrong
For information, I used the code for setSoftInputMode for ADJUST PAN
setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN |WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
and to set the numeric keypad, use this.setInputType(InputType.TYPE_CLASS_NUMBER);
Edited - when I delete -
setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN |WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
everything works fine from activity (the keyboard number opens with the edittext number, the alphanumeric keyboard opens in the alphanumeric editor), except that the content does not go up, it means that the keyboard is hidden with edittext (because ignorance of this property is SOFT_INPUT_ADJUST_PAN)
Help with thanks
source share