For an android app with a custom design, I open the keyboard manually as it have no input on which to focus.
I open it using :
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput (InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY);
I would like to set the keyboard as InputType.TYPE_CLASS_NUMBER but can’t found any documentation on how to do this.
Thanks in advance !
The solution to this problem is to set all the edittext in in a LinearLayout and to set visibility to “Gone” on that LinearLayout and not on the EditText(s).
This way you can still focus on the EditText programmatically by doing a click on any other element.