android强制关闭软键盘代码

InputMethodManager imm = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE);
                                imm.toggleSoftInput(
                                        InputMethodManager.HIDE_IMPLICIT_ONLY, 0);
原文地址:https://www.cnblogs.com/tony-yang-flutter/p/android_input.html