I'm developing an application for Android 3.1. Is there a way to show (or forcing) the Android keyboard in fullscreen mode?
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.
The Android system shows an on-screen keyboard—known as a soft input method—when a text field in your UI receives focus.
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.
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 :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With