/** * 隐藏键盘 * * @param context * @param view */public static void hideSoftInput(Context context, View view) {    InputMethodManager imm = (InputMethodManager) IMApp.getAppContext().getSystemService(Context.INPUT_METHOD_SERVICE);    if (view == null) {        imm.toggleSoftInput(0, InputMethodManager.RESULT_HIDDEN);    } else {        imm.hideSoftInputFromWindow(view.getWindowToken(), 0); //强制隐藏键盘    }}/** * 判断输入法是否显示 * * @param context * @return */public static boolean getSoftInputState(Activity context) {    return context.getWindow().getAttributes().softInputMode == WindowManager.LayoutParams.SOFT_INPUT_STATE_UNSPECIFIED;}

更多相关文章

  1. Android中如何自动弹出软键盘
  2. android webview全屏显示html内容
  3. Android(安卓)开启关闭软键盘
  4. android 监听系统键盘显隐
  5. Android键盘弹出的研究
  6. Android(安卓)editText自动弹出软键盘
  7. Android(安卓)隐藏虚拟导航栏
  8. Android输入法弹出流程
  9. android键盘映射之一

随机推荐

  1. Android(安卓)Studio引入.so文件的正确姿
  2. Activity的四种启动模式和onNewIntent()
  3. [置顶] Android(安卓)上如何移植live555
  4. Android刷Recovery
  5. Android(安卓)Material Design 使用TabLa
  6. android音频hal层简介
  7. 重新解压打包android 根文件系统 ramdisk
  8. Android(安卓)内核源代码交叉编译
  9. Android(安卓)嵌套滑动机制(NestedScrolli
  10. android editText 插入表情,或者是图片