Earlier there was no problem with soft input mode, but after including ConstraintLayout
, content of fragment doesn\'t move up when the keyboard appears.
Man
I encountered the same problem with you, we declared android:windowSoftInputMode="stateAlwaysHidden|adjustResize"
in the AndroidManifest.xml
, but in fact the App showed the results like adjustPan
, the contents are gone on top of the soft keyboard. So I set adjustResize
programmatically, successfully solved this problem:
Just add this line to your onCreate
:
getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);