When I open they soft keyboard in my app while in landscape mode, the keyboard covers my entire app. The only thing that is shown is the keyboard and a space at the top to enter text. Keyboard is appearing correct in portrait mode.
Asked
Active
Viewed 2.3k times
7
-
it happens in 2.3.3 only...above all version is ok.. – Mohammed mansoor Mar 20 '13 at 12:22
-
i have few edittext fields...when i am clicking on any...in landscape mode..keyboad appears above the app.. – Mohammed mansoor Mar 20 '13 at 12:23
-
Instead of talking code, can you put the code here ? Also can you google before posting on SO ? – Siddharth Mar 20 '13 at 12:24
-
yes i googled...but not getting a comfortable answer.. – Mohammed mansoor Mar 20 '13 at 12:25
-
AGAIN `Instead of talking code, can you put the code here ?` Did you read the FAQ of SO ? – Siddharth Mar 20 '13 at 12:28
-
1got solution..[link](http://stackoverflow.com/questions/4336762/disabling-the-fullscreen-editing-view-for-soft-keyboard-input-in-landscape) – Mohammed mansoor Mar 20 '13 at 12:29
1 Answers
11
Basically its not a bug of your application. Its how your keyboard IME is designed. When user goes to landscape mode, it'll take up the whole screen.
You may install some third party IME from play store and see how it works in portrait mode.
As per the link given by MCeley below. You can do something as below
@Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI;
}
or change your manifest for your activity as below
android:imeOptions="flagNoExtractUi"
-
1Yes, the entire screen is taken up because that is how the keyboard is designed. However, you can tell the native keyboard that you don't want to use this edit mode even in landscape. See the related question that the user got their solution from: http://stackoverflow.com/questions/4336762/disabling-the-fullscreen-editing-view-for-soft-keyboard-input-in-landscape – Michael Celey Mar 20 '13 at 12:48
-
Thanks for the link so `outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI;` does the magic – Jay Mayu Mar 20 '13 at 12:50
-
-
Follow this link to getting answer http://developer.android.com/guide/topics/ui/controls/text.html#Flags – Krunal Shah Apr 03 '14 at 04:58
-
1It's enough to just add android:imeOptions="flagNoExtractUi" inside a particular EditText element. – goRGon Oct 13 '14 at 22:43