Using "adjustPan" or "adjustResize" specific to the fragment

I am wondering if you can specify programmatically or in xml the way to use windowSoftInputModefor Fragment.

Say I only have one activitycontaining two Fragment, one fragment should use adjustPanand the other adjustResize. How should I do it?

Thank!

+4
source share
1 answer

You can change the behavior programmatically, see this answer for this .

, : A , getActivity(), , , .

B, .

  • adjustResize : WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE
  • adjustPan: WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN
+6

Source: https://habr.com/ru/post/1656974/


All Articles