attach not-again dialog to turn done menuitem

This commit is contained in:
Andy2 2010-10-25 21:32:07 -07:00
parent d7b6cb0691
commit f9b2eb4a3e
3 changed files with 12 additions and 1 deletions

View file

@ -48,6 +48,7 @@
<string name="key_notagain_flip">key_notagain_flip</string>
<string name="key_notagain_zoom">key_notagain_zoom</string>
<string name="key_notagain_undo">key_notagain_undo</string>
<string name="key_notagain_done">key_notagain_done</string>
<string name="relayids_extra">org.eehouse.android.xw4.relayids_extra</string>

View file

@ -433,5 +433,8 @@
turn.</string>
<string name="not_again_newgamenet">The new game you have created </string>
<string name="not_again_done">The \"pts\" counter that appears at
the right end of the rack is an alternative to this menu
item.</string>
</resources>

View file

@ -448,11 +448,18 @@ public class BoardActivity extends XWActivity implements UtilCtxt {
{
boolean handled = true;
JNIThread.JNICmd cmd = JNIThread.JNICmd.CMD_NONE;
Runnable proc = null;
int id = item.getItemId();
switch ( id ) {
case R.id.board_menu_done:
cmd = JNIThread.JNICmd.CMD_COMMIT;
proc = new Runnable() {
public void run() {
m_jniThread.handle( JNIThread.JNICmd.CMD_COMMIT );
}
};
showNotAgainDlgThen( R.string.not_again_done,
R.string.key_notagain_done, proc );
break;
// case R.id.board_menu_juggle:
// cmd = JNIThread.JNICmd.CMD_JUGGLE;