Editext gets the focus and automatically pops up the input keyboard with the following code:
EditText edittext.setfocusable (TRUE); Edittext.setfocusableintouchmode (TRUE); Edittext.requestfocus (); Inputmethodmanager InputManager = (Inputmethodmanager) edittext.getcontext (). Getsystemservice (Context.INPUT_METHOD _service); Inputmanager.showsoftinput (editText, 0);
If it is already in an interface will be immediately pop-up input keyboard, may be due to the interface is not loaded complete and can not eject, need appropriate delay, such as delay 500 milliseconds:
Timer timer = new timer (); Timer.schedule (New TimerTask () {public void run () {Inputmethodmanager I Nputmanager = (Inputmethodmanager) edittext.getcontext (). Getsystemservice (Context.input_method_service); Inputmanager.showsoftinput (editText, 0); }},500);
Android EditText automatically eject soft keyboard (input keyboard)