Android: issue with customizing ExpandableListView
<p>I would like my ExpandableListView to only allow one group to be expanded at a time.  I found a solution that does this by overriding the ListViewAdapter's onGroupExpanded to method to collapse the previously expanded group:</p>

<pre><code>@Override
public void onGroupExpanded(int groupPosition)
{
   //collapse the old expanded group, if not the same
   //as new group to expand
   if(groupPosition != mLastExpandedGroup &amp;&amp; mLastExpandedGroup != -1)
   {
        epView.collapseGroup(mLastExpandedGroup);
   }

   mLastExpandedGroup = groupPosition;
   super.onGroupExpanded(groupPosition);           
}
</code></pre>

<p>By default, when a new group is expanded the ListView is scrolled such that the GroupView for the new group remains visible.  This scrolling doesn't work properly for my customized ListView (often the GroupView for the newly expanded group ends up off screen).</p>

<p>Based on the android source, the reason this doesn't work is because the post-expansion scroll position is determined prior the onGroupExpanded method being called, so the position is inaccurate after I force a group to collapse.</p>

<p>So, any suggestions for a custom ListView which allows only one group expanded at a time, and properly scrolls so that the GroupView is visible when a group is exapnded?</p>
