You can retrieve the EditText from the Preference and from there setInputTypes or use KeyListeners to inform the keyboard:
EditText et = (EditText) editTextPref.getEditText();
et.setKeyListener(DigitsKeyListener.getInstance());
found the answer on older thread