Android 2.1: How do I bring the soft keyboard manually?
I've a form that occupies upper half of the screen and I want to show the 开发者_如何学编程keyboard at the bottom half all the time. How do I do that?
(Android 2.1, NexusOne)
If you want to control the soft-keyboard in your code you can use the InputMethodManager to call it up and dismiss it. getSystemService() is a call on the Activity.
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(activeView, 0);
Try <activity android:windowSoftInputMode="stateAlwaysVisible">
For more info see this page
try View v = getWindow().getDecorView();
精彩评论