mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-07 05:24:46 +01:00
add newbie hint for new back-button-clear-selection behavior
This commit is contained in:
parent
3ff063a490
commit
266cd6fe85
3 changed files with 19 additions and 8 deletions
|
@ -80,6 +80,7 @@
|
||||||
|
|
||||||
<string name="key_notagain_sync">key_notagain_sync</string>
|
<string name="key_notagain_sync">key_notagain_sync</string>
|
||||||
<string name="key_notagain_newselect">key_notagain_newselect</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_chat">key_notagain_chat</string>
|
||||||
<string name="key_notagain_relay">key_notagain_relay</string>
|
<string name="key_notagain_relay">key_notagain_relay</string>
|
||||||
<string name="key_notagain_hintprev">key_notagain_hintprev</string>
|
<string name="key_notagain_hintprev">key_notagain_hintprev</string>
|
||||||
|
|
|
@ -2167,6 +2167,10 @@
|
||||||
then act on selected games, e.g. to delete them, using the menu or
|
then act on selected games, e.g. to delete them, using the menu or
|
||||||
\"Actionbar.\"</string>
|
\"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_gamesf">Games: %d"</string>
|
||||||
<string name="sel_groupsf">Groups: %d"</string>
|
<string name="sel_groupsf">Groups: %d"</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -84,13 +84,14 @@ public class GamesList extends XWExpandableListActivity
|
||||||
private static final String REMATCH_ROWID_EXTRA = "rowid_rm";
|
private static final String REMATCH_ROWID_EXTRA = "rowid_rm";
|
||||||
private static final String ALERT_MSG = "alert_msg";
|
private static final String ALERT_MSG = "alert_msg";
|
||||||
|
|
||||||
private static enum GamesActions { NEW_NET_GAME,
|
private static enum GamesActions { NEW_NET_GAME
|
||||||
RESET_GAMES,
|
,RESET_GAMES
|
||||||
SYNC_MENU,
|
,SYNC_MENU
|
||||||
NEW_FROM,
|
,NEW_FROM
|
||||||
DELETE_GAMES,
|
,DELETE_GAMES
|
||||||
DELETE_GROUPS,
|
,DELETE_GROUPS
|
||||||
OPEN_GAME
|
,OPEN_GAME
|
||||||
|
,CLEAR_SELS
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final int[] DEBUGITEMS = {
|
private static final int[] DEBUGITEMS = {
|
||||||
|
@ -616,6 +617,9 @@ public class GamesList extends XWExpandableListActivity
|
||||||
case OPEN_GAME:
|
case OPEN_GAME:
|
||||||
doOpenGame( params );
|
doOpenGame( params );
|
||||||
break;
|
break;
|
||||||
|
case CLEAR_SELS:
|
||||||
|
clearSelections();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
Assert.fail();
|
Assert.fail();
|
||||||
}
|
}
|
||||||
|
@ -636,7 +640,9 @@ public class GamesList extends XWExpandableListActivity
|
||||||
if ( 0 == m_selGames.size() && 0 == m_selGroupIDs.size() ) {
|
if ( 0 == m_selGames.size() && 0 == m_selGroupIDs.size() ) {
|
||||||
super.onBackPressed();
|
super.onBackPressed();
|
||||||
} else {
|
} else {
|
||||||
clearSelections();
|
showNotAgainDlgThen( R.string.not_again_backclears,
|
||||||
|
R.string.key_notagain_backclears,
|
||||||
|
GamesActions.CLEAR_SELS.ordinal() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue