我使用 Edittext 且在 Manifest 中配置了 android:windowSoftInputMode="stateVisible"
。现在,当我开始这个 activity 时,键盘就会显示出来。怎么隐藏键盘?我不能使用 android:windowSoftInputMode="stateHidden
,因为当键盘是可见的,然后最小化应用程序,恢复它的键盘应该是可见的。
我试过如下方法
InputMethodManager imm = (InputMethodManager) getSystemService (INPUT _ Method _ SERVICE) ;
GetCurrentFocus () . getWindowToken () ,0) ;
但是没有成功。