¿Por qué el teclado en modo horizontal aparece así?

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) ingrese la descripción de la imagen . 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) : ingrese la descripción de la imagen

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?

preguntado el 02 de febrero de 12 a las 10:02

2 Respuestas

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

This sounds like the same issue discussed in Teclado desproporcionado en diseño horizontal Android

contestado el 23 de mayo de 17 a las 13:05

The answer which gave by @Frank was right but you can do programmatically by this:

editText.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);

Respondido 27 Feb 15, 11:02

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.