learner
learner

Reputation: 11780

scroll both parent LinearLayout and Listview

I have the following layout

<LinearLayout
 android:orientation="vertical"
 ...
/>

  <include .../>
  <include .../>

  <ListView ... />
</LinearLayout>

Naturally the content of the ListView scrolls. But what I want is for the entire LinearLayout to scroll concurrently with the ListView, appropriately of course: i.e. both should scroll until only the ListView is on screen. I already tried wrapping the LinearLayout with a ScrollView. That's not working

Upvotes: 0

Views: 244

Answers (1)

Illegal Argument
Illegal Argument

Reputation: 10338

You can inflate a custom view using layout inflater then use this:

myList.addFooterView(myFooter);//for header
myList.addHeaderView(myHeader);//for footer

Upvotes: 1

Related Questions