Java代码
//显示键盘
imm.showSoftInput(editText, 0);
//隐藏键盘
imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);