if (duration > 0) {
int height2 = getPreferredHeight(-1, false);
collapseTransition = new ExpansionTransition(height1, height2,
true, duration, EXPANSION_RATE);
collapseTransition.start(new TransitionListener() {
public void transitionCompleted(Transition transition) {
rollup.setExpanded(false);
collapseTransition = null;
}
});