EditTextPreference - only numeric value inputType - isn't working

前端 未结 8 600
迷失自我
迷失自我 2021-01-18 10:16


        
8条回答
  •  独厮守ぢ
    2021-01-18 10:27

    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

提交回复
热议问题