android 隐藏键盘 显示键盘

隐藏

imm=(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);

   imm.hideSoftInputFromWindow(listText.getWindowToken(),0);


InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
imm.toggleSoftInput(0, InputMethodManager.SHOW_IMPLICIT);

显示

       imm.showSoftInput(listText,0);

你可能感兴趣的:(android,service,input,android开发)