How to keep soft keyboard from opening on activity launch in Android?

Posted by araja on Stack Overflow See other posts from Stack Overflow or by araja
Published on 2010-06-14T13:01:13Z Indexed on 2010/06/15 8:52 UTC
Read the original article Hit count: 161

Filed under:

In an Android app, whenever the activity launches, the textbox gets the focus and the soft keyboard pops up automatically. I have tried to stop this by using following line in onCreate method, but it does not work.

((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(EditText.getWindowToken(), 0);

© Stack Overflow or respective owner

Related posts about android