Positioning EditText Above Keyboard

后端 未结 4 1065
面向向阳花
面向向阳花 2021-01-01 11:36

I have got an EditText looking like this (with \"bottom gravity\"):

\"enter

相关标签:
4条回答
  • 2021-01-01 11:53

    It happens sometimes that setting activity in manifest

    android:windowSoftInputMode="stateVisible|adjustResize" 
    android:windowSoftInputMode="adjustPan" 
    

    not working with scrolling views containing EditText.

    After research I figured out that to work in some cases parent layout has to be set android:fitsSystemWindows="true". Then native functionality of scrolling EditText above scrollbar working like a charm.

    0 讨论(0)
  • 2021-01-01 11:56

    In your Manifest file add the following code for this particular activity

    <activity android:windowSoftInputMode="adjustPan">
    

    Check this doc for more info.

    0 讨论(0)
  • 2021-01-01 12:00

    use

    android:windowSoftInputMode="stateVisible|adjustResize" 
    

    in your Manifest file. See developer site for your reference

    0 讨论(0)
  • 2021-01-01 12:11

    Simply setting android:fitsSystemWindows="true" in the layout xml worked for me.

    0 讨论(0)
提交回复
热议问题