"setExpanded" is not available for 2.4

I wonder if you would be willing to set this up as a 2.4 branch that includes the other improvements but leaves out the setExpanded method which is not available in 2.4.