利用 editText.setInputType(InputType.TYPE_NULL);来禁止手机软键盘。 editText.setInputType(InputType.TYPE_CLASS_TEXT);来开启软键盘。