You could do as Kieran suggested, or if you only have one open at a time, you can just keep track of which last clicked. You could do this by declaring int lastclicked in the class body, and then in the listener, as the Korean suggested, put list.collapseGroup(lastclicked)
I would give an example code, but I am on my mobile phone. Unfortunately.
But I just personally prefer to use the latter method than using a for loop. It seems more efficient.
Jakar Oct 12 '11 at 0:18 2011-10-12 00:18
source share