mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
When games moved, the destination group is opened and the games that
were moved stay selected.
This commit is contained in:
parent
8f8911c7d1
commit
788542c874
3 changed files with 5 additions and 5 deletions
|
@ -234,6 +234,7 @@ public class GameListAdapter implements ExpandableListAdapter {
|
|||
GameListItem result =
|
||||
GameListItem.makeForRow( m_context, rowid, m_handler,
|
||||
groupPosition, m_fieldID, m_cb );
|
||||
result.setSelected( m_cb.getSelected( result ) );
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -337,10 +337,6 @@ public class GameListItem extends LinearLayout
|
|||
s_invalRows.remove( m_rowid );
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_cb.getSelected( GameListItem.this ) && m_selected ) {
|
||||
toggleSelected();
|
||||
}
|
||||
}
|
||||
} // class LoadItemTask
|
||||
|
||||
|
|
|
@ -301,6 +301,8 @@ public class GamesList extends XWExpandableListActivity
|
|||
for ( long rowid : m_rowids ) {
|
||||
DBUtils.moveGame( GamesList.this, rowid, gid );
|
||||
}
|
||||
DBUtils.setGroupExpanded( GamesList.this, gid,
|
||||
true );
|
||||
onContentChanged();
|
||||
}
|
||||
};
|
||||
|
@ -631,7 +633,7 @@ public class GamesList extends XWExpandableListActivity
|
|||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if ( 0 == m_selGames.size() ) {
|
||||
if ( 0 == m_selGames.size() && 0 == m_selGroupIDs.size() ) {
|
||||
super.onBackPressed();
|
||||
} else {
|
||||
clearSelections();
|
||||
|
@ -796,6 +798,7 @@ public class GamesList extends XWExpandableListActivity
|
|||
|
||||
// Game menus
|
||||
case R.id.list_item_move:
|
||||
keepSels = true;
|
||||
if ( 1 >= m_adapter.getGroupCount() ) {
|
||||
showOKOnlyDialog( R.string.no_move_onegroup );
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue