I created sample project using Android Studio: Create new Project -> Navigation Drawer Activity. In testing purposes, my content Fragment
contains just a single EditText
widget.
In my AndroidManifest
I have this line for the main activity:
android:windowSoftInputMode="stateUnchanged|adjustResize"
Odd behavior: if I launch the app in portrait mode, open soft keyboard (by tapping on the EditText
) and rotate device to landscape mode... keyboard disappears for some reason. If I create the same project but with no NavigationDrawer
(just Activity + Fragment) the keyboard remains visible (as expected with stateUnchanged
property).
Did anyone know what is the reason of such behavior? Actually I want to keep the keyboard expanded after switching to landscape mode (if it was opened in portrait). I can track keyboard state and via special flag restore its visibility when needed programmatically, I know. I just wonder why the native tools don't work with NavigationDrawer
.