commonsguy/cwac-merge — pull request #2 by theomega (2012-03-26 14:57:46+00:00)
Title: Ability to change the visibility of all pieces

I needed the ability to change the visibility of all items after adding them. For example, I wanted to add a help message as header which could be "removed" later on. Setting the visibility of the View to "GONE" does not help as the ListView still reserves space for this item.

For this reason I modified the MergeAdapter. After adding a "piece" (View, Views or Adapter), you get a pieceNo which uniquely identifies this piece. Later on you can toggle the visibility by using this pieceNo.

I updated the Demo to show the abilities of this code. Perhaps someone finds this code usefull!