From 9820f6bf6b54daa22958dc997c8d3706ed10c974 Mon Sep 17 00:00:00 2001 From: Eric House Date: Thu, 21 Nov 2013 18:57:32 -0800 Subject: [PATCH] set selection on children being reused --- .../XWords4/src/org/eehouse/android/xw4/GameListAdapter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListAdapter.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListAdapter.java index 9e5d03787..4bdfdb6b6 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListAdapter.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListAdapter.java @@ -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 ); + } } } }