in my app I have a class derived from ExpandableListActivity. When I scroll the contents, and then change phone orientation or edit an item and then go back to the list, the ori
This is how I got ExpandableListView.onRestoreInstanceState and onSaveInstanceState to work...
If you're using BaseExpandableListAdapter the default implementation of getCombinedChildId returns a negative number. If you look into the code for restoring a list from saved state scroll position it ignores ids which are negative. Return a positive IDs so that the AbsListView onRestoreInstanceState will set the scroll position properly. To return positive IDs change the or of getCombinedChildId from 0x8000000000000000L (negative) to 0x7000000000000000L (positive) by over-riding the method in your subclass of BaseExpandableListAdapter as follows...
public long getCombinedChildId(long groupId, long childId)
{
long or = 0x7000000000000000L;
long group = (groupId & 0x7FFFFFFF) << 32;
long child = childId & 0xFFFFFFFF;
return or | group | child;
}