//This can be used to suppress the keyboard until the user actually touched the edittext view.
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
// It works.
t.setInputType(InputType.TYPE_NULL);
// It doesn't work, seems a bug
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(t.getWindowToken(), 0);
阅读(650) | 评论(0) | 转发(0) |