I have an EditText and a Button. On click of the button i want to open the EditText keyboard and at the same time request focus on the
EditText
Button
The following works for me and should help:
EditText yourEditText= (EditText) findViewById(R.id.yourEditText); InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(yourEditText, InputMethodManager.SHOW_IMPLICIT);