set selection on children being reused

This commit is contained in:
Eric House 2013-11-21 18:57:32 -08:00
parent 4748d9f459
commit 9820f6bf6b

View file

@ -202,6 +202,7 @@ public class GameListAdapter implements ExpandableListAdapter {
GameListItem child = (GameListItem)convertView;
long rowid = getRowIDFor( groupPosition, childPosition );
if ( child.getRowID() == rowid ) {
child.setSelected( m_cb.getSelected( child ) );
result = child;
}
}
@ -387,7 +388,9 @@ public class GameListAdapter implements ExpandableListAdapter {
int pos = getGroupPosition( iter.next() );
if ( 0 <= pos ) { // still exists?
GameListGroup group = getGroupItemFor( pos );
group.setSelected( false );
if ( null != group ) {
group.setSelected( false );
}
}
}
}