Show soft keyboard when Activity starts

Posted by Al on Stack Overflow See other posts from Stack Overflow or by Al
Published on 2010-03-17T23:01:21Z Indexed on 2010/03/18 2:41 UTC
Read the original article Hit count: 640

Filed under:
|
|

I have 2 activities, A and B. When A starts, it checks for a condition and if true, it calls startActivityForResult() to start B. B only takes text input so it makes sense for the soft keyboard to automatically pop up when B start. When the activity starts, the EditText already has focus and it ready for input.

The problem is that the keyboard never shows up, even with windowSoftInputMode="stateAlwaysVisible" set in the manifest under the <activity> tag for B. I also tried with the value set to stateVisible. Since it doesn't show up automatically, I have to tap the EditText to make it show.

Anyone know what the solution might be?

© Stack Overflow or respective owner

Related posts about android

Related posts about soft-keyboard