0

I'm using the MergeAdapter from commonsware to put several views and one adapter into one list. By the way this is great. But I have problems to remove a particular view from the list. The MergeAdapter doesn't have a method like removeView(int index) or removeView (View v).

How can I do this?

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
Benjamin
  • 105
  • 1
  • 5
  • possible duplicate of [Remove view from MergeAdapter](http://stackoverflow.com/questions/6939440/remove-view-from-mergeadapter) – CommonsWare Aug 17 '11 at 21:24

1 Answers1

2

You're right, there is no method like removeView() - but what about settings its visibility to NONE and then sending notifyDatSetChanged() ? I've used this technique in the past to handle UI changes at runtime.

Cody Caughlan
  • 32,456
  • 5
  • 63
  • 68
  • Ok, that's a start. But when i set the views visibility to GONE, its space will be reserved. So theres a padding at the bottom of the list. Any ideas to handle that? – Benjamin Aug 18 '11 at 08:27