1, method One (if the input method is displayed on the window, then hide, or vice versa)
[Java]View Plaincopyprint?
- Inputmethodmanager IMM = (inputmethodmanager) getsystemservice (Context.input_method_service);
- Imm.togglesoftinput (0, inputmethodmanager.hide_not_always);
2, Method Two (view is to accept the soft keyboard input views, show_forced means force display)
[Java]View Plaincopyprint?
- Inputmethodmanager IMM = (inputmethodmanager) getsystemservice (Context.input_method_service);
- Imm.showsoftinput (view,inputmethodmanager.show_forced);
[Java]View Plaincopyprint?
- Imm.hidesoftinputfromwindow (View.getwindowtoken (), 0 //Force hidden keyboard   
3, call the hidden system default Input method
[Java]View Plaincopyprint?
- ( Inputmethodmanager) Getsystemservice (Context.input_method_service)). Hidesoftinputfromwindow ( Widgetsearchactivity. this
4, get the input method open state
[Java]View Plaincopyprint?
- Inputmethodmanager IMM = (inputmethodmanager) getsystemservice (Context.input_method_service);
- Boolean isopen=imm.isactive (); //isopen returns True to indicate that the input method is open
Android manual display with hidden soft keyboard hide_not_always