I have a custom keyboard and don't want to show the Android softkeyboard. this can be achieved by the following code (How to hide Android soft keyboard on EditText):
editText.setInputType(InputType.TYPE_NULL);
However the EditText should only allow digits. this can be achieved by:
editText.setInputType(InputType.TYPE_CLASS_NUMBER);
I can't seem to find a way to combine both functionalities. setting the inputtype to TYPE_NULL will allow non-numeric characters when using hardware keyboards and setting the inputtype to TYPE_CLASS_NUMBER causes the soft keyboard to pop up.