Varying windowSoftInputMode for fragments inside the viewpager

You can call on each onCreateView

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

check http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#SOFT_INPUT_ADJUST_RESIZE

In my case, this doesn’t solve the problem, because I have a transparent Fragment (a chat window) which I need to resize and the fragment on the bottom shouldn’t. but I think it could be useful to you.

Leave a Comment