I have an android layout which has a scrollView
with a number of elements with in it. At the bottom of the scrollView
I have a listView
The answer is simple and I am surprised it has yet to be answered here.
Use a Header View
or/and Footer View
on the list itself.
Don't mix a ScrollView
with a ListView
or anything that can scroll. It's meant to be used with headers and footers :)
Essentially, take all the content above your ListView, put it in another .xml file as a layout and then in code inflate it and add it to the list as a header view.
i.e.
View header = getLayoutInflater().inflate(R.layout.header, null);
View footer = getLayoutInflater().inflate(R.layout.footer, null);
listView.addHeaderView(header);
listView.addFooterView(footer);