2

I add a FooterView in a ListView, But when i set the view's visibility to be GONE, just the content of the view is hided. I means it leaves space in the ListView, just like the INVISIBLE. How can I set the FooterView to be GONE.

Akshay
  • 2,506
  • 4
  • 34
  • 55
TaoZang
  • 1,690
  • 2
  • 15
  • 15

1 Answers1

1

You can remove the footer like this:

listView.removeFooterView(view);
Andy Res
  • 15,963
  • 5
  • 60
  • 96
  • That wouldn't help for two reasons: firstly, headers and footers are supposed to be added *before* you set the adapter (so the view can wrap the adapter cursor with the header and footer views) and secondly, if you have multiple headers or footers and you wanted to add one back, it would be put on the end of the list, not in its original position. – Andrew Wyld Oct 29 '13 at 11:57