tags:

views:

395

answers:

4

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)

+1  A: 

Try <activity android:windowSoftInputMode="stateAlwaysVisible">

For more info see this page

mbaird
+1  A: 

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);
haseman
A: 

Hi all, I have the same problem on the Android 2.1: my problem is when I try to get the active view using: View v=getWindow().getCurrentFocus();

v is always null although it works fine on the android 1.5 can anybody help??

sharktigerman
A: 

try View v = getWindow().getDecorView();

Ved