protected void onCreate (Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setContentView(R.layout.input); mInput = (EditText)findViewById(R.id.text_input); ... mInput.requestFocus(); mInput.postDelayed(new Runnable() { @Override public void run() { // TODO Auto-generated method stub InputMethodManager keyboard =(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); keyboard.showSoftInput(mInput, 0); } },200); }
The keyboard is hidden immediately, so showing the keyboard with some delay will solve the problem.