Scrollview issue in Android layout xml

前端 未结 3 1970
Happy的楠姐
Happy的楠姐 2020-12-22 10:03

I am trying to set up a scrollview in the middle of the screen, in between a header (tablelayout) and a footer (button within ralativelayout).... My problem is that while th

3条回答
  •  清酒与你
    2020-12-22 10:55

    you might want to try setting in your ScrollView:

    android:layout_above="@id/The_RelativeLayout_that_has_your_bottom_button"
    android:layout_below="@id/The_one_that_should_be_above_the_scroll_view"
    

    Sorry to be vague, but your xml is very very difficult to read with the formatting as it is right now.

    But the idea is, in your ScrollView, you can tell it to be between (or above and below) two other objects. You will need to give those two other objects (the RelativeLayout and maybe a TableRow?) id's so that you can reference those id's in the ScrollView.

提交回复
热议问题