How can I create a ListView
with fixed header and footer?
I don\'t want the header/footer to scroll with the items in the ListView
.
create your custom header and footer with your list view code as below
header.xml file
footer.xml file
add where your listview
LayoutInflater inflaterHeader = getLayoutInflater();
ViewGroup header = (ViewGroup) inflaterFooter.inflate(
R.layout.header, list_view, false);
yourListView.addHeaderView(header);
LayoutInflater inflaterFooter = getLayoutInflater();
ViewGroup footer = (ViewGroup) inflaterFooter.inflate(
R.layout.footer, list_view, false);
yourListView.addFooterView(footer);