Android - Soft Keyboard pushes layout of my activity out of screen

后端 未结 3 839
醉话见心
醉话见心 2021-01-01 11:24

My activity\'s layout is as shown below.



        
3条回答
  •  我在风中等你
    2021-01-01 11:43

    For those that are interested, the difference between android:windowSoftInputMode="adjustPan" and android:windowSoftInputMode="adjustResize" :

    "adjustResize"

    The activity's window is resized to make room for the soft keyboard on screen.

    "adjustPan"

    The contents of the activity's window are automatically panned so that the current focus is never blocked by the keyboard. This is so the user can see what they are typing. This is generally less desirable than resizing, because the user may need to close the soft keyboard to get at and interact with obscured parts of the window.

    Android Documentation

    Cited link

提交回复
热议问题