-3

I have a Activity with a layout that is a Vertical LinearLayout with a RelativeLayout, ListView, and another RelativeLayout. My problem is if the ListView is longer than the screen, the bottom RelativeLayout will be unreachable. How can I ensure the last RelativeLayout is always at the end of the ListView? Can I make it part of the ListView somehow?

Barodapride
  • 3,475
  • 4
  • 25
  • 36

2 Answers2

1

i suggest you to use recyclerview instead of ListVIew

Nitin Thakor
  • 535
  • 3
  • 15
1

If you want the Bottom RelativeLayout to be fixed use the root element as RelativeLayout and use alignParentBottom = true to bottom RelativeLayout and position ListView below top relative layout and above bottom relativelayout.

if the bottom Relativelayout has to scroll as you scroll listview add it as a footer to the listview.Checkout this on how to add a footer to listview.

Community
  • 1
  • 1
Ravi Theja
  • 3,371
  • 1
  • 22
  • 34