I would like to have the listview in a ListActivity be displayed with the header and footer visible all the time even if the list data is empty.
An empty list causes
Ok, this workaround is a hack. But, without having to create a fake item.
For an ArrayAdapter you can add a null item... i.e.
myAdapter.add(null);
And, in the MyAdapter getView(..) you do something like:
myItem = getItem(position);
if (myItem == null) {
return getLayoutInflater().inflate(R.layout.my_empty_row, null);
} else {
...
}