mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-23 07:27:22 +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 result =
|
||||||
GameListItem.makeForRow( m_context, rowid, m_handler,
|
GameListItem.makeForRow( m_context, rowid, m_handler,
|
||||||
groupPosition, m_fieldID, m_cb );
|
groupPosition, m_fieldID, m_cb );
|
||||||
|
result.setSelected( m_cb.getSelected( result ) );
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -337,10 +337,6 @@ public class GameListItem extends LinearLayout
|
||||||
s_invalRows.remove( m_rowid );
|
s_invalRows.remove( m_rowid );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_cb.getSelected( GameListItem.this ) && m_selected ) {
|
|
||||||
toggleSelected();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} // class LoadItemTask
|
} // class LoadItemTask
|
||||||
|
|
||||||
|
|
|
@ -301,6 +301,8 @@ public class GamesList extends XWExpandableListActivity
|
||||||
for ( long rowid : m_rowids ) {
|
for ( long rowid : m_rowids ) {
|
||||||
DBUtils.moveGame( GamesList.this, rowid, gid );
|
DBUtils.moveGame( GamesList.this, rowid, gid );
|
||||||
}
|
}
|
||||||
|
DBUtils.setGroupExpanded( GamesList.this, gid,
|
||||||
|
true );
|
||||||
onContentChanged();
|
onContentChanged();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -631,7 +633,7 @@ public class GamesList extends XWExpandableListActivity
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
if ( 0 == m_selGames.size() ) {
|
if ( 0 == m_selGames.size() && 0 == m_selGroupIDs.size() ) {
|
||||||
super.onBackPressed();
|
super.onBackPressed();
|
||||||
} else {
|
} else {
|
||||||
clearSelections();
|
clearSelections();
|
||||||
|
@ -796,6 +798,7 @@ public class GamesList extends XWExpandableListActivity
|
||||||
|
|
||||||
// Game menus
|
// Game menus
|
||||||
case R.id.list_item_move:
|
case R.id.list_item_move:
|
||||||
|
keepSels = true;
|
||||||
if ( 1 >= m_adapter.getGroupCount() ) {
|
if ( 1 >= m_adapter.getGroupCount() ) {
|
||||||
showOKOnlyDialog( R.string.no_move_onegroup );
|
showOKOnlyDialog( R.string.no_move_onegroup );
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue