Why getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE); doesn't work in landscape mode?

Divers picture Divers · Mar 18, 2011 · Viewed 7.5k times · Source

I have the following code in my Main Activity's onCreate:

 getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
 getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);

I have the following code in my layout-land/main.xml

<EditText android:imeOptions="flagNoExtractUi</EditText>

Why softinput is superimposed on top of the UI but does not change its size in landscape mode?
How can I do to make an UI with softinput behave in landscape mode the same as in portrait mode?

Answer

Doug Ray picture Doug Ray · Aug 28, 2014

Hey Divers it may be that fact you are missing a closing quotation mark on your IME options declaration in your manifest.xml.

Hope this helps !!

Doug