Android: ScrollView not scrolling with keyboard out

后端 未结 11 1561
别跟我提以往
别跟我提以往 2020-12-04 15:23

I\'ve got a layout with some views, from which one is an EditText. The layout easily fits on one page, BUT, when the soft keyboard is out, the layout doesn\'t scroll. Here\'

相关标签:
11条回答
  • 2020-12-04 16:25

    In my case I had to Remove the following property from my style to make it work .

    <item name="android:windowFullscreen">true</item>
    
    0 讨论(0)
  • 2020-12-04 16:25

    If your First Fragment Scroll perfectly and the second fragment did not scroll then you should use the second fragment replace and do below things

    1.Add in ScrollView

    android:fillViewport="true"
    android:fitsSystemWindows="true"
    

    2.Add in Manifest

    android:windowSoftInputMode="adjustResize|stateVisible"
    

    If you add fragment then my suggestion is you need to Replace the Fragment

    0 讨论(0)
  • 2020-12-04 16:26

    Try to set ScrollView as your parent layout. It works like charm for me!

    0 讨论(0)
  • 2020-12-04 16:27

    Okay, apparently the ScrollView's android:layout_height mustn't be set to wrap_content. I set it to match_parent and set the android:layout_above to the button on the bottom of the page.

    Don't ask me why, but this fixed the issue.

    0 讨论(0)
  • 2020-12-04 16:30

    In my case, nothing of the above worked.

    I had item name="android:windowTranslucentStatus">true</item> in my theme. And it was fixed by setting android:fitsSystemWindows="true" in the parent layout where is my scrollview.

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