Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android 3.1 soft keyboard in fullscreen mode

I'm developing an application for Android 3.1. Is there a way to show (or forcing) the Android keyboard in fullscreen mode?

like image 334
carlovv Avatar asked Jul 11 '11 07:07

carlovv


People also ask

How do I make the keyboard softer on my Android?

By default, the soft keyboard may not appear on the emulator. If you want to test with the soft keyboard, be sure to open up the Android Virtual Device Manager ( Tools => Android => AVD Manager ) and uncheck "Enable Keyboard Input" for your emulator.

What is soft keyboard in Android?

The Android system shows an on-screen keyboard—known as a soft input method—when a text field in your UI receives focus.

What is windowSoftInputMode?

The windowSoftInputMode attribute is set on the activity — usually through the Android manifest — and it specifies the way the onscreen keyboard behaves when an activity comes into a user's focus.


1 Answers

Try:

activity.getWindow().setSoftInputMode(
                        WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);

To hide, or:

activity.getWindow().setSoftInputMode(
                        WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);

or:

activity.getWindow().setSoftInputMode(
                        WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);

One of these should help you :)

like image 188
Codeman Avatar answered Sep 21 '22 21:09

Codeman