ScrollView doesn't scroll to the bottom

前端 未结 7 947
独厮守ぢ
独厮守ぢ 2020-12-02 18:22

I have a certain problem in my Activity. The ScrollView doesn\'t scroll down to the bottom.
I have a screenshot for you.

相关标签:
7条回答
  • 2020-12-02 18:36

    This may be problem with your layout design. if you add the margin for the view then it will be visible clearly. so

    In scrollview add

    android:layout_marginBottom="30dp"
    
    0 讨论(0)
  • 2020-12-02 18:41

    The problem is android:layout_margin="10dp" in RelativeLayout of SrcollView

    Replace

     <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="10dp">
    

    with

    <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="10dp" >
    
    0 讨论(0)
  • 2020-12-02 18:42

    For me, setting explicit height to some of my internal elements helped.

    0 讨论(0)
  • 2020-12-02 18:45

    Try NestedScrollView instead.

    I have had this problem several times myself and while simply adding extra padding to the bottom to hide the fact that the scroll view is going 'behind' the bottom bar works, a better solution is to use a NestedScrollView as mentioned in this answer: https://stackoverflow.com/a/36871385/6573127

    0 讨论(0)
  • 2020-12-02 18:55

    I was suffering from the same problem. Try to add more padding to the bottom of scrollView.It works for me.

    android:paddingBottom="50dp"
    
    0 讨论(0)
  • 2020-12-02 18:56

    use in scrollView xml

    android:paddingBottom="10dp"
    

    it'll shift content of scroll view to 10 dp upward not the VIEW.

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