Search code examples
androidkeyboardandroid-edittext

why keyboard in Landscape mode appear like this?


I have a problem with showing keyboard in landscape mode. My activity contains an EditText where user must type a license number, and a Button ok. It looks like this (image is rotated) enter image description . I put the following code to appear the keyboard when activity starts :

imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);  
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,InputMethodManager.HIDE_IMPLICIT_ONLY);
imm.showSoftInput(this.licenseText,InputMethodManager.SHOW_FORCED);

and now my activity starts like this (image is rotated) : enter image description

My question is : why it looks like this? If it is in portrait mode, the keyboard appear on the bottom side but not affect the contain of current view. I put the EditText on the top side for this, to appear the keyboard on bottom. Can anyone explain me why this looks like this or if i can change this?


Solution

  • Try setting android:imeOptions="actionDone|flagNoExtractUi".

    This sounds like the same issue discussed in Unproportional keyboard on landscape layout Android