I have an EditText with inputMode = text. By default software keyboard is shown as alphabetical and user have to switch it to numeric by pressing specific key (
you can achieve it by setting the below attribute to EditText on xml has follows android:inputType="number"
I find the answer a day, finally I found this and its work.
android:inputType="textVisiblePassword"
source
Just set it with the normal setter:
EditText editText = (EditText) findViewById(R.id.edittext);
editText.setInputType(InputType.TYPE_CLASS_NUMBER);
// or
editText.setInputType(InputType.TYPE_CLASS_TEXT);