add newbie hint for new back-button-clear-selection behavior

This commit is contained in:
Eric House 2013-10-24 18:51:55 -07:00
parent 3ff063a490
commit 266cd6fe85
3 changed files with 19 additions and 8 deletions

View file

@ -80,6 +80,7 @@
<string name="key_notagain_sync">key_notagain_sync</string>
<string name="key_notagain_newselect">key_notagain_newselect</string>
<string name="key_notagain_backclears">key_notagain_backclears</string>
<string name="key_notagain_chat">key_notagain_chat</string>
<string name="key_notagain_relay">key_notagain_relay</string>
<string name="key_notagain_hintprev">key_notagain_hintprev</string>

View file

@ -2167,6 +2167,10 @@
then act on selected games, e.g. to delete them, using the menu or
\"Actionbar.\"</string>
<string name="not_again_backclears">New feature: The back button
now clears any selection instead of exiting. Hit it again to exit
the app.</string>
<string name="sel_gamesf">Games: %d"</string>
<string name="sel_groupsf">Groups: %d"</string>
</resources>

View file

@ -84,13 +84,14 @@ public class GamesList extends XWExpandableListActivity
private static final String REMATCH_ROWID_EXTRA = "rowid_rm";
private static final String ALERT_MSG = "alert_msg";
private static enum GamesActions { NEW_NET_GAME,
RESET_GAMES,
SYNC_MENU,
NEW_FROM,
DELETE_GAMES,
DELETE_GROUPS,
OPEN_GAME
private static enum GamesActions { NEW_NET_GAME
,RESET_GAMES
,SYNC_MENU
,NEW_FROM
,DELETE_GAMES
,DELETE_GROUPS
,OPEN_GAME
,CLEAR_SELS
};
private static final int[] DEBUGITEMS = {
@ -616,6 +617,9 @@ public class GamesList extends XWExpandableListActivity
case OPEN_GAME:
doOpenGame( params );
break;
case CLEAR_SELS:
clearSelections();
break;
default:
Assert.fail();
}
@ -636,7 +640,9 @@ public class GamesList extends XWExpandableListActivity
if ( 0 == m_selGames.size() && 0 == m_selGroupIDs.size() ) {
super.onBackPressed();
} else {
clearSelections();
showNotAgainDlgThen( R.string.not_again_backclears,
R.string.key_notagain_backclears,
GamesActions.CLEAR_SELS.ordinal() );
}
}