Android 2.1: How can I bring a soft keyboard manually?

I have a form that occupies the upper half of the screen, and I want to show the keyboard in the lower half all the time. How to do it?

(Android 2.1, NexusOne)

+3
source share
3 answers

If you want to control the soft keyboard in your code, you can use InputMethodManager to call it and reject it. getSystemService () is an activity call.

InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(activeView, 0);
+4
source

Try <activity android:windowSoftInputMode="stateAlwaysVisible">

See this page for more details.

+2
source

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

0
source

Source: https://habr.com/ru/post/1730115/


All Articles