首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

封闭键盘显示

2012-08-27 
关闭键盘显示两种方法:法一:InputMethodManager imm (InputMethodManager)getSystemService(Context.INP

关闭键盘显示

两种方法:

法一:

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

?法二:

 InputMethodManager imm = (InputMethodManager)                getSystemService(Context.INPUT_METHOD_SERVICE);        imm.hideSoftInputFromWindow(autoView.getWindowToken(), 0);
?

热点排行