1

Possible Duplicate:
Android: show soft keyboard automatically when focus is on an EditText

I'm writing an app and one of the main things I need is to for the keyboard open and able to type on the text field thats in focus.

I've tried:

((InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE)).toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY);

This does not work, can anyone give me a hint?

Community
  • 1
  • 1
NightSkyCode
  • 1,123
  • 2
  • 16
  • 31

1 Answers1

1

try to add follows to your activity in AndroidMainifest.xml:

android:windowSoftInputMode="stateAlwaysVisible"

and then may look like that

<activity
    android:name=".MainActivity"
    android:windowSoftInputMode="stateAlwaysVisible">
</activity>
YulCheney
  • 2,227
  • 2
  • 16
  • 14