Today, I sorted out the operation of the input method under Android: specific as follows
First, open the Input Method window:
Copy Code code as follows:
Inputmethodmanager Inputmethodmanager = (inputmethodmanager) getsystemservice (Context.input_method_service);
Edit text or other views that accept soft keyboard input
Imm.showsoftinput (submitbt,inputmethodmanager.show_forced);
second, close access to the Law window
Copy Code code as follows:
Nputmethodmanager Inputmethodmanager = (inputmethodmanager) getsystemservice (Context.input_method_service);
Inputmethodmanager.hidesoftinputfromwindow (OpeListActivity.this.getCurrentFocus (). Getwindowtoken (),
Inputmethodmanager.hide_not_always);
<div style= "LINE-HEIGHT:26PX; font-family:arial; Color:rgb (51,51,51);
Font-size:14px "id=_mcepaste>//to accept soft keyboard input edit text or other views </DIV>
<p style= "LINE-HEIGHT:26PX; font-family:arial; Color:rgb (51,51,51); Font-size:14px ">inputMethodManager</P>
<div style= "LINE-HEIGHT:26PX; font-family:arial; Color:rgb (51,51,51); Font-size:14px "Id=_mcepaste>.showsoftinput (submitbt,inputmethodmanager.show_forced);</DIV>
if the input method is open, close, if not open, open
Copy Code code as follows:
Inputmethodmanager m= (Inputmethodmanager) Getsystemservice (Context.input_method_service);
M.togglesoftinput (0, inputmethodmanager.hide_not_always);
four, get Input method open state
Copy Code code as follows:
Inputmethodmanager IMM = (inputmethodmanager) getsystemservice (Context.input_method_service);
Boolean isopen=imm.isactive ();
IsOpen returns True, means the input method opens