views:

30

answers:

1

Hi,

I have a ListView that I'm trying to add a footer to. For some reason, it won't show up. My footer is defined in a separate XML layout called layout_footer.

View v = getLayoutInflater().inflate(R.layout.layout_footer, getListView(), false);
getListView().addFooterView(v);

Here is the code in my ListActivity's onCreate method. Please note that it is the last thing I do in onCreate.

I want this item to scroll with the rest of the list and, according to the resources I've found, I believe this is how you do it. Unfortunately, the footer does not show :(

Help would be much appreciated

A: 

Apparently if I add the footer before setting the Adapter, it works

Andrew