1 public class ViewUtil { 2 3 public static void hideOneInputMethod(Activity act, View v) { 4 // 从系统服务中获取输入法管理器 5 InputMethodManager imm = (InputMethodManager) act.getSystemService(Context.INPUT_METHOD_SERVICE); 6 // 关闭屏幕上的输入法软键盘 7 imm.hideSoftInputFromWindow(v.getWindowToken(), 0); 8 } 9 10 }
标签:输入法,imm,InputMethodManager,键盘,关闭,act,public From: https://www.cnblogs.com/fan-wang/p/17169054.html