Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 412
Gabrielle Avatar asked Jan 17 '23 14:01

Gabrielle


1 Answers

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

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

like image 88
Frank Leigh Avatar answered Jan 30 '23 03:01

Frank Leigh