From 8816e590f2215004036fd46fe22fe4898cc25ea1 Mon Sep 17 00:00:00 2001 From: Eric House Date: Mon, 14 Oct 2013 19:01:51 -0700 Subject: [PATCH 001/240] copy gmail app's selection color --- xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java index aa8c20eaa..7d046bd29 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java @@ -43,7 +43,7 @@ public class XWApp extends Application { public static final String SMS_PUBLIC_HEADER = "-XW4"; public static final int MAX_TRAY_TILES = 7; // comtypes.h - public static final int SEL_COLOR = Color.argb( 255, 127, 127, 255 ); + public static final int SEL_COLOR = Color.argb( 0xFF, 0xCF, 0XE9, 0XF3 ); private static UUID s_UUID = null; private static Boolean s_onEmulator = null; From c2605344e0b8fba0be34455ec39668de2c401d40 Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 15 Oct 2013 07:33:24 -0700 Subject: [PATCH 002/240] remove padding that was causing redraw after unselected --- xwords4/android/XWords4/res/layout/game_list_item.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/xwords4/android/XWords4/res/layout/game_list_item.xml b/xwords4/android/XWords4/res/layout/game_list_item.xml index 056db650d..fafdd705a 100644 --- a/xwords4/android/XWords4/res/layout/game_list_item.xml +++ b/xwords4/android/XWords4/res/layout/game_list_item.xml @@ -1,7 +1,6 @@ - From 4af68196a665f12f64fa84995dfacfdaed2e6fef Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 15 Oct 2013 07:37:31 -0700 Subject: [PATCH 003/240] use same icon for both add menuitems --- xwords4/android/XWords4/res/menu/games_list_menu.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwords4/android/XWords4/res/menu/games_list_menu.xml b/xwords4/android/XWords4/res/menu/games_list_menu.xml index ab8d25f22..69f78fb5c 100644 --- a/xwords4/android/XWords4/res/menu/games_list_menu.xml +++ b/xwords4/android/XWords4/res/menu/games_list_menu.xml @@ -8,7 +8,7 @@ /> Date: Tue, 15 Oct 2013 18:44:10 -0700 Subject: [PATCH 004/240] new newbie message (not yet used) --- xwords4/android/XWords4/res/values/common_rsrc.xml | 1 + xwords4/android/XWords4/res/values/strings.xml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/xwords4/android/XWords4/res/values/common_rsrc.xml b/xwords4/android/XWords4/res/values/common_rsrc.xml index 59c42355f..636b10376 100644 --- a/xwords4/android/XWords4/res/values/common_rsrc.xml +++ b/xwords4/android/XWords4/res/values/common_rsrc.xml @@ -80,6 +80,7 @@ key_udp_interval key_notagain_sync + key_notagain_newselect key_notagain_chat key_notagain_relay key_notagain_hintprev diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml index 322fdbdb1..df7ce966e 100644 --- a/xwords4/android/XWords4/res/values/strings.xml +++ b/xwords4/android/XWords4/res/values/strings.xml @@ -2174,4 +2174,9 @@ Wordlist browser Message from relay + + Tapping a game opens it.\n\nYou + can instead tap the icon at the left to select or deselect games, + then act on selected games, e.g. to delete them, using the menu or + \"Actionbar.\" From 2ec0a7ba8d406c7028d3cc444e42229f9cd2dbb2 Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 15 Oct 2013 18:48:02 -0700 Subject: [PATCH 005/240] new param to interface to allow passing closure to delayed dialog handling. Unused, so no behavior change yet. --- .../org/eehouse/android/xw4/BoardActivity.java | 6 +++--- .../eehouse/android/xw4/DictBrowseActivity.java | 2 +- .../org/eehouse/android/xw4/DictsActivity.java | 2 +- .../src/org/eehouse/android/xw4/DlgDelegate.java | 15 +++++++++------ .../src/org/eehouse/android/xw4/DlgState.java | 1 + .../src/org/eehouse/android/xw4/GameConfig.java | 2 +- .../src/org/eehouse/android/xw4/GamesList.java | 2 +- .../org/eehouse/android/xw4/NewGameActivity.java | 2 +- .../eehouse/android/xw4/SMSInviteActivity.java | 2 +- .../src/org/eehouse/android/xw4/XWActivity.java | 2 +- .../android/xw4/XWExpandableListActivity.java | 2 +- .../org/eehouse/android/xw4/XWListActivity.java | 2 +- 12 files changed, 22 insertions(+), 18 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java index d1cbd979a..24ba752d4 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java @@ -785,7 +785,7 @@ public class BoardActivity extends XWActivity showNotAgainDlgThen( R.string.not_again_done, R.string.key_notagain_done, COMMIT_ACTION ); } else { - dlgButtonClicked( COMMIT_ACTION, AlertDialog.BUTTON_POSITIVE ); + dlgButtonClicked( COMMIT_ACTION, AlertDialog.BUTTON_POSITIVE, null ); } break; @@ -891,7 +891,7 @@ public class BoardActivity extends XWActivity // DlgDelegate.DlgClickNotify interface ////////////////////////////////////////////////// @Override - public void dlgButtonClicked( int id, int which ) + public void dlgButtonClicked( int id, int which, Object[] params ) { if ( LAUNCH_INVITE_ACTION == id ) { if ( DlgDelegate.DISMISS_BUTTON != which ) { @@ -1302,7 +1302,7 @@ public class BoardActivity extends XWActivity m_toastStr = toastStr; if ( naMsg == 0 ) { dlgButtonClicked( SHOW_EXPL_ACTION, - AlertDialog.BUTTON_POSITIVE ); + AlertDialog.BUTTON_POSITIVE, null ); } else { showNotAgainDlgThen( naMsg, naKey, SHOW_EXPL_ACTION ); } diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictBrowseActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictBrowseActivity.java index 8ede3dbd3..e982d6271 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictBrowseActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictBrowseActivity.java @@ -301,7 +301,7 @@ public class DictBrowseActivity extends XWListActivity // DlgDelegate.DlgClickNotify interface ////////////////////////////////////////////////// @Override - public void dlgButtonClicked( int id, int which ) + public void dlgButtonClicked( int id, int which, Object[] params ) { Assert.assertTrue( FINISH_ACTION == id ); finish(); diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsActivity.java index cb931e8d4..d26ad7a4c 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsActivity.java @@ -644,7 +644,7 @@ public class DictsActivity extends XWExpandableListActivity } // DlgDelegate.DlgClickNotify interface - public void dlgButtonClicked( int id, int which ) + public void dlgButtonClicked( int id, int which, Object[] params ) { switch( id ) { case DELETE_DICT_ACTION: diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java index aaff02f2d..69be7993a 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java @@ -56,7 +56,7 @@ public class DlgDelegate { private static final String STATE_KEYF = "STATE_%d"; public interface DlgClickNotify { - void dlgButtonClicked( int id, int button ); + void dlgButtonClicked( int id, int button, Object[] params ); } private Activity m_activity; @@ -164,7 +164,8 @@ public class DlgDelegate { // dialog if ( SKIP_CALLBACK != callbackID ) { m_clickCallback.dlgButtonClicked( callbackID, - AlertDialog.BUTTON_POSITIVE ); + AlertDialog.BUTTON_POSITIVE, + null ); } } else { String msg = m_activity.getString( msgID ); @@ -202,7 +203,7 @@ public class DlgDelegate { } else { post( new Runnable() { public void run() { - m_clickCallback.dlgButtonClicked( callbackID, EMAIL_BTN ); + m_clickCallback.dlgButtonClicked( callbackID, EMAIL_BTN, null ); } }); } @@ -345,7 +346,7 @@ public class DlgDelegate { if ( SKIP_CALLBACK != state.m_cbckID ) { m_clickCallback. dlgButtonClicked( state.m_cbckID, - AlertDialog.BUTTON_POSITIVE ); + AlertDialog.BUTTON_POSITIVE, null ); } } }; @@ -411,7 +412,8 @@ public class DlgDelegate { public void onClick( DialogInterface dlg, int button ) { if ( SKIP_CALLBACK != state.m_cbckID ) { m_clickCallback.dlgButtonClicked( state.m_cbckID, - button ); + button, + state.m_params ); } } }; @@ -428,7 +430,8 @@ public class DlgDelegate { dropState( state ); if ( SKIP_CALLBACK != state.m_cbckID ) { m_clickCallback.dlgButtonClicked( state.m_cbckID, - DISMISS_BUTTON ); + DISMISS_BUTTON, + state.m_params ); } m_activity.removeDialog( id ); } diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgState.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgState.java index c4f14648f..b0c6dfbf9 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgState.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgState.java @@ -29,6 +29,7 @@ public class DlgState implements Parcelable { public int m_posButton; public int m_cbckID = 0; public int m_prefsKey; + public Object[] m_params; public DlgState( int id, String msg, int cbckID ) { diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfig.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfig.java index c35139e61..58bf16be4 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfig.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfig.java @@ -600,7 +600,7 @@ public class GameConfig extends XWActivity } @Override - public void dlgButtonClicked( int id, int button ) + public void dlgButtonClicked( int id, int button, Object[] params ) { switch( id ) { case LOCKED_CHANGE_ACTION: diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java index 0c06c746b..0c7d27eab 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java @@ -552,7 +552,7 @@ public class GamesList extends XWExpandableListActivity // DlgDelegate.DlgClickNotify interface @Override - public void dlgButtonClicked( int id, int which ) + public void dlgButtonClicked( int id, int which, Object[] params ) { if ( AlertDialog.BUTTON_POSITIVE == which ) { switch( id ) { diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/NewGameActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/NewGameActivity.java index d1b90148a..6ed4e6b3a 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/NewGameActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/NewGameActivity.java @@ -149,7 +149,7 @@ public class NewGameActivity extends XWActivity { // DlgDelegate.DlgClickNotify interface @Override - public void dlgButtonClicked( int id, int which ) + public void dlgButtonClicked( int id, int which, Object[] params ) { switch( id ) { case NEW_GAME_ACTION: diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/SMSInviteActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/SMSInviteActivity.java index 36d1619f7..b15e75e5b 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/SMSInviteActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/SMSInviteActivity.java @@ -190,7 +190,7 @@ public class SMSInviteActivity extends InviteActivity { // DlgDelegate.DlgClickNotify interface @Override - public void dlgButtonClicked( int id, int which ) + public void dlgButtonClicked( int id, int which, Object[] params ) { switch( which ) { case AlertDialog.BUTTON_POSITIVE: diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWActivity.java index 358cfa50b..c176454a7 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWActivity.java @@ -178,7 +178,7 @@ public class XWActivity extends Activity } // DlgDelegate.DlgClickNotify interface - public void dlgButtonClicked( int id, int which ) + public void dlgButtonClicked( int id, int which, Object[] params ) { Assert.fail(); } diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWExpandableListActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWExpandableListActivity.java index 26138c66f..3d8ed8ef0 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWExpandableListActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWExpandableListActivity.java @@ -127,7 +127,7 @@ public class XWExpandableListActivity extends ExpandableListActivity } // DlgDelegate.DlgClickNotify interface - public void dlgButtonClicked( int id, int which ) + public void dlgButtonClicked( int id, int which, Object[] params ) { Assert.fail(); } diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWListActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWListActivity.java index e93f3f926..3e54da2fd 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWListActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWListActivity.java @@ -163,7 +163,7 @@ public class XWListActivity extends ListActivity } // DlgDelegate.DlgClickNotify interface - public void dlgButtonClicked( int id, int which ) + public void dlgButtonClicked( int id, int which, Object[] params ) { Assert.fail(); } From 4bc554bc4065922cf28af89eee0b44a7ea88cb6b Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 15 Oct 2013 19:04:58 -0700 Subject: [PATCH 006/240] use new params-passing DlgDelegate to add hint about new selecting feature. --- .../android/XWords4/res/values/strings.xml | 2 +- .../org/eehouse/android/xw4/DlgDelegate.java | 13 +++-- .../src/org/eehouse/android/xw4/DlgState.java | 7 +++ .../org/eehouse/android/xw4/GamesList.java | 49 ++++++++++++------- .../android/xw4/XWExpandableListActivity.java | 6 +++ 5 files changed, 56 insertions(+), 21 deletions(-) diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml index df7ce966e..e4c2a4586 100644 --- a/xwords4/android/XWords4/res/values/strings.xml +++ b/xwords4/android/XWords4/res/values/strings.xml @@ -2176,7 +2176,7 @@ Message from relay Tapping a game opens it.\n\nYou - can instead tap the icon at the left to select or deselect games, + can instead tap the icons at the left to select or deselect games, then act on selected games, e.g. to delete them, using the menu or \"Actionbar.\" diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java index 69be7993a..5854d8602 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java @@ -157,7 +157,7 @@ public class DlgDelegate { } public void showNotAgainDlgThen( int msgID, int prefsKey, - int callbackID ) + int callbackID, Object[] params ) { if ( XWPrefs.getPrefsBoolean( m_activity, prefsKey, false ) ) { // If it's set, do the action without bothering with the @@ -165,17 +165,24 @@ public class DlgDelegate { if ( SKIP_CALLBACK != callbackID ) { m_clickCallback.dlgButtonClicked( callbackID, AlertDialog.BUTTON_POSITIVE, - null ); + params ); } } else { String msg = m_activity.getString( msgID ); DlgState state = - new DlgState( DIALOG_NOTAGAIN, msg, callbackID, prefsKey ); + new DlgState( DIALOG_NOTAGAIN, msg, callbackID, prefsKey, + params ); addState( state ); m_activity.showDialog( DIALOG_NOTAGAIN ); } } + public void showNotAgainDlgThen( int msgID, int prefsKey, + int callbackID ) + { + showNotAgainDlgThen( msgID, prefsKey, callbackID, null ); + } + public void showNotAgainDlgThen( int msgID, int prefsKey ) { showNotAgainDlgThen( msgID, prefsKey, SKIP_CALLBACK ); diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgState.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgState.java index b0c6dfbf9..315fc6d33 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgState.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgState.java @@ -41,6 +41,13 @@ public class DlgState implements Parcelable { this( id, msg, R.string.button_ok, cbckID, prefsKey ); } + public DlgState( int id, String msg, int cbckID, int prefsKey, + Object[] params ) + { + this( id, msg, R.string.button_ok, cbckID, prefsKey ); + m_params = params; + } + public DlgState( int id, String msg, int posButton, int cbckID, int prefsKey ) { diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java index 0c7d27eab..5ecc46f34 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java @@ -90,6 +90,7 @@ public class GamesList extends XWExpandableListActivity private static final int NEW_FROM_ACTION = 5; private static final int DELETE_GROUP_ACTION = 6; private static final int DELETE_SELGAMES_ACTION = 7; + private static final int OPEN_GAME_ACTION = 8; private static final int[] DEBUGITEMS = { R.id.gamel_menu_loaddb , R.id.gamel_menu_storedb , R.id.gamel_menu_checkupdates @@ -494,23 +495,9 @@ public class GamesList extends XWExpandableListActivity // dialog in case it was dismissed. That way it to check for // an empty room name. if ( !m_gameLaunched ) { - if ( summary.conType == CommsAddrRec.CommsConnType.COMMS_CONN_RELAY - && summary.roomName.length() == 0 ) { - // If it's unconfigured and of the type RelayGameActivity - // can handle send it there, otherwise use the full-on - // config. - Class clazz; - if ( RelayGameActivity.isSimpleGame( summary ) ) { - clazz = RelayGameActivity.class; - } else { - clazz = GameConfig.class; - } - GameUtils.doConfig( this, rowid, clazz ); - } else { - if ( checkWarnNoDict( rowid ) ) { - launchGame( rowid ); - } - } + showNotAgainDlgThen( R.string.not_again_newselect, + R.string.key_notagain_newselect, + OPEN_GAME_ACTION, rowid, summary ); } } @@ -585,6 +572,9 @@ public class GamesList extends XWExpandableListActivity case DELETE_SELGAMES_ACTION: deleteSelected(); break; + case OPEN_GAME_ACTION: + doOpenGame( params ); + break; default: Assert.fail(); } @@ -1186,6 +1176,31 @@ public class GamesList extends XWExpandableListActivity tryAlert( intent ); } + private void doOpenGame( Object[] params ) + { + GameSummary summary = (GameSummary)params[1]; + long rowid = (Long)params[0]; + + if ( summary.conType == CommsAddrRec.CommsConnType.COMMS_CONN_RELAY + && summary.roomName.length() == 0 ) { + // If it's unconfigured and of the type RelayGameActivity + // can handle send it there, otherwise use the full-on + // config. + Class clazz; + + if ( RelayGameActivity.isSimpleGame( summary ) ) { + clazz = RelayGameActivity.class; + } else { + clazz = GameConfig.class; + } + GameUtils.doConfig( this, rowid, clazz ); + } else { + if ( checkWarnNoDict( rowid ) ) { + launchGame( rowid ); + } + } + } + public static void onGameDictDownload( Context context, Intent intent ) { intent.setClass( context, GamesList.class ); diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWExpandableListActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWExpandableListActivity.java index 3d8ed8ef0..87e9d02ea 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWExpandableListActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWExpandableListActivity.java @@ -84,6 +84,12 @@ public class XWExpandableListActivity extends ExpandableListActivity m_delegate.doSyncMenuitem(); } + protected void showNotAgainDlgThen( int msgID, int prefsKey, + int action, Object... params ) + { + m_delegate.showNotAgainDlgThen( msgID, prefsKey, action, params ); + } + protected void showNotAgainDlgThen( int msgID, int prefsKey, int action ) { From 27fa9bf203bfdf764ccd453c4dac1ed3d6d0de24 Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 15 Oct 2013 19:14:49 -0700 Subject: [PATCH 007/240] deprecate delete context menu item --- .../org/eehouse/android/xw4/GamesList.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java index 5ecc46f34..b48397817 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java @@ -85,12 +85,11 @@ public class GamesList extends XWExpandableListActivity private static final int NEW_NET_GAME_ACTION = 1; private static final int RESET_GAME_ACTION = 2; - private static final int DELETE_GAME_ACTION = 3; - private static final int SYNC_MENU_ACTION = 4; - private static final int NEW_FROM_ACTION = 5; - private static final int DELETE_GROUP_ACTION = 6; - private static final int DELETE_SELGAMES_ACTION = 7; - private static final int OPEN_GAME_ACTION = 8; + private static final int SYNC_MENU_ACTION = 3; + private static final int NEW_FROM_ACTION = 4; + private static final int DELETE_GROUP_ACTION = 5; + private static final int DELETE_SELGAMES_ACTION = 6; + private static final int OPEN_GAME_ACTION = 7; private static final int[] DEBUGITEMS = { R.id.gamel_menu_loaddb , R.id.gamel_menu_storedb , R.id.gamel_menu_checkupdates @@ -552,9 +551,6 @@ public class GamesList extends XWExpandableListActivity GameUtils.resetGame( this, m_rowid ); onContentChanged(); // required because position may change break; - case DELETE_GAME_ACTION: - GameUtils.deleteGame( this, m_rowid, true ); - break; case SYNC_MENU_ACTION: doSyncMenuitem(); break; @@ -780,8 +776,9 @@ public class GamesList extends XWExpandableListActivity m_rowid = rowid; if ( R.id.list_item_delete == menuID ) { - showConfirmThen( R.string.confirm_delete, R.string.button_delete, - DELETE_GAME_ACTION ); + showOKOnlyDialog( "This menu is going away soon. To delete games, " + + "select them by tapping the left icon then use " + + "action bar or screen menu's new delete item." ); } else { if ( checkWarnNoDict( m_rowid ) ) { switch ( menuID ) { From f30203bb22adb7191f541548a5ce7860f9877bbb Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 15 Oct 2013 21:15:44 -0700 Subject: [PATCH 008/240] fix NPE when choosing not to see new hint dialog again --- .../XWords4/src/org/eehouse/android/xw4/DlgDelegate.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java index 5854d8602..29381b03a 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java @@ -353,7 +353,8 @@ public class DlgDelegate { if ( SKIP_CALLBACK != state.m_cbckID ) { m_clickCallback. dlgButtonClicked( state.m_cbckID, - AlertDialog.BUTTON_POSITIVE, null ); + AlertDialog.BUTTON_POSITIVE, + state.m_params ); } } }; From 44bae9246b07efb5a885852977095a6781c78a8d Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 15 Oct 2013 21:17:34 -0700 Subject: [PATCH 009/240] use enum instead of a bunch of constants --- .../org/eehouse/android/xw4/GamesList.java | 48 ++++++++++--------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java index b48397817..4e769e7c6 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java @@ -83,13 +83,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 final int NEW_NET_GAME_ACTION = 1; - private static final int RESET_GAME_ACTION = 2; - private static final int SYNC_MENU_ACTION = 3; - private static final int NEW_FROM_ACTION = 4; - private static final int DELETE_GROUP_ACTION = 5; - private static final int DELETE_SELGAMES_ACTION = 6; - private static final int OPEN_GAME_ACTION = 7; + private static enum GamesActions { NEW_NET_GAME, + RESET_GAME, + SYNC_MENU, + NEW_FROM, + DELETE_GROUP, + DELETE_SELGAMES, + OPEN_GAME + }; private static final int[] DEBUGITEMS = { R.id.gamel_menu_loaddb , R.id.gamel_menu_storedb , R.id.gamel_menu_checkupdates @@ -496,7 +497,8 @@ public class GamesList extends XWExpandableListActivity if ( !m_gameLaunched ) { showNotAgainDlgThen( R.string.not_again_newselect, R.string.key_notagain_newselect, - OPEN_GAME_ACTION, rowid, summary ); + GamesActions.OPEN_GAME.ordinal(), + rowid, summary ); } } @@ -541,34 +543,35 @@ public class GamesList extends XWExpandableListActivity public void dlgButtonClicked( int id, int which, Object[] params ) { if ( AlertDialog.BUTTON_POSITIVE == which ) { - switch( id ) { - case NEW_NET_GAME_ACTION: + GamesActions action = GamesActions.values()[id]; + switch( action ) { + case NEW_NET_GAME: if ( checkWarnNoDict( m_netLaunchInfo ) ) { makeNewNetGameIf(); } break; - case RESET_GAME_ACTION: + case RESET_GAME: GameUtils.resetGame( this, m_rowid ); onContentChanged(); // required because position may change break; - case SYNC_MENU_ACTION: + case SYNC_MENU: doSyncMenuitem(); break; - case NEW_FROM_ACTION: + case NEW_FROM: long newid = GameUtils.dupeGame( GamesList.this, m_rowid ); if ( null != m_adapter ) { m_adapter.inval( newid ); } break; - case DELETE_GROUP_ACTION: + case DELETE_GROUP: GameUtils.deleteGroup( this, m_groupid ); onContentChanged(); break; - case DELETE_SELGAMES_ACTION: + case DELETE_SELGAMES: deleteSelected(); break; - case OPEN_GAME_ACTION: + case OPEN_GAME: doOpenGame( params ); break; default: @@ -703,7 +706,7 @@ public class GamesList extends XWExpandableListActivity case R.id.gamel_menu_delete: showConfirmThen( R.string.confirm_seldeletes, R.string.button_delete, - DELETE_SELGAMES_ACTION ); + GamesActions.DELETE_SELGAMES.ordinal() ); break; case R.id.gamel_menu_dicts: @@ -713,7 +716,7 @@ public class GamesList extends XWExpandableListActivity case R.id.gamel_menu_checkmoves: showNotAgainDlgThen( R.string.not_again_sync, R.string.key_notagain_sync, - SYNC_MENU_ACTION ); + GamesActions.SYNC_MENU.ordinal() ); break; case R.id.gamel_menu_checkupdates: @@ -784,7 +787,8 @@ public class GamesList extends XWExpandableListActivity switch ( menuID ) { case R.id.list_item_reset: showConfirmThen( R.string.confirm_reset, - R.string.button_reset, RESET_GAME_ACTION ); + R.string.button_reset, + GamesActions.RESET_GAME.ordinal() ); break; case R.id.list_item_config: GameUtils.doConfig( this, m_rowid, GameConfig.class ); @@ -802,7 +806,7 @@ public class GamesList extends XWExpandableListActivity case R.id.list_item_new_from: showNotAgainDlgThen( R.string.not_again_newfrom, R.string.key_notagain_newfrom, - NEW_FROM_ACTION ); + GamesActions.NEW_FROM.ordinal() ); break; case R.id.list_item_copy: @@ -850,7 +854,7 @@ public class GamesList extends XWExpandableListActivity if ( 0 < nGames ) { msg += getString( R.string.group_confirm_delf, nGames ); } - showConfirmThen( msg, DELETE_GROUP_ACTION ); + showConfirmThen( msg, GamesActions.DELETE_GROUP.ordinal() ); } break; case R.id.list_group_rename: @@ -1014,7 +1018,7 @@ public class GamesList extends XWExpandableListActivity String msg = getString( R.string.dup_game_queryf, create.toString() ); m_netLaunchInfo = nli; - showConfirmThen( msg, NEW_NET_GAME_ACTION ); + showConfirmThen( msg, GamesActions.NEW_NET_GAME.ordinal() ); } } // startNewNetGame From bfea8dad496e5b4c6f205c0ccc1287293cd6e3f4 Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 15 Oct 2013 22:03:14 -0700 Subject: [PATCH 010/240] fix NPE. I think it's a bug that null appears there, but better not to crash. --- .../XWords4/src/org/eehouse/android/xw4/GameListAdapter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListAdapter.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListAdapter.java index 603615833..ebca22600 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListAdapter.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListAdapter.java @@ -369,7 +369,9 @@ public class GameListAdapter implements ExpandableListAdapter { GameListItem[] items = new GameListItem[rowids.size()]; getGameItemsFor( rowids, items ); for ( GameListItem item : items ) { - item.setSelected( false ); + if ( null != item ) { + item.setSelected( false ); + } } } From 972629db8e6f0181240a253ca2769b6e2efe15af Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 15 Oct 2013 22:04:33 -0700 Subject: [PATCH 011/240] string tweaks, including calling Exchange "Trade" because it's smaller. --- xwords4/android/XWords4/res/values/strings.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml index e4c2a4586..d3d9e536f 100644 --- a/xwords4/android/XWords4/res/values/strings.xml +++ b/xwords4/android/XWords4/res/values/strings.xml @@ -105,7 +105,7 @@ Wordlists - Settings + App Settings... - %s settings + Settings for %s %s settings (networked) @@ -527,8 +527,8 @@ - Commit exchange - Cancel exchange + Commit trade + Cancel trade Tap tiles to select... @@ -653,7 +653,7 @@ - Exchange tiles + Trade - Crosswords settings + Crosswords Settings diff --git a/xwords4/android/XWords4/res/menu/games_list_menu.xml b/xwords4/android/XWords4/res/menu/games_list_menu.xml index 69f78fb5c..ee7917d74 100644 --- a/xwords4/android/XWords4/res/menu/games_list_menu.xml +++ b/xwords4/android/XWords4/res/menu/games_list_menu.xml @@ -6,15 +6,20 @@ android:icon="@drawable/content_new" android:showAsAction="ifRoom" /> - + + Date: Tue, 15 Oct 2013 22:12:49 -0700 Subject: [PATCH 014/240] add pencil/edit actionbar icons --- .../XWords4/res/drawable-hdpi/content_edit.png | Bin 0 -> 1875 bytes .../XWords4/res/drawable-mdpi/content_edit.png | Bin 0 -> 1490 bytes .../XWords4/res/drawable-xhdpi/content_edit.png | Bin 0 -> 2382 bytes 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 xwords4/android/XWords4/res/drawable-hdpi/content_edit.png create mode 100644 xwords4/android/XWords4/res/drawable-mdpi/content_edit.png create mode 100644 xwords4/android/XWords4/res/drawable-xhdpi/content_edit.png diff --git a/xwords4/android/XWords4/res/drawable-hdpi/content_edit.png b/xwords4/android/XWords4/res/drawable-hdpi/content_edit.png new file mode 100644 index 0000000000000000000000000000000000000000..3eb5190fb44de54efc5a1675090aeedb25b1d0c6 GIT bin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Va1om~$Ur#`5Qe$IF~bK9zL z59`=95B6^3Q+atSO#U&?t%;e&6>C&ALOACJ)~>&<_;`kq^_tgb*W8Kl{}5puuA_ZR8UB6G*-uI~#`?F)!(!!@9H7+O9uGMd@aqnMs+dBH-V%`TKM+CD()?aA- z*ju50WBrrY7k_ literal 0 HcmV?d00001 diff --git a/xwords4/android/XWords4/res/drawable-xhdpi/content_edit.png b/xwords4/android/XWords4/res/drawable-xhdpi/content_edit.png new file mode 100644 index 0000000000000000000000000000000000000000..4215579aedd5edf6f5314de15e7b9175eb5acff2 GIT binary patch literal 2382 zcmaJ@c{r478y_msW+`JSOd}taSAy59GBp8L9gzx#JT_wSE4)5mM)+EvD@ zKp@as4|kHEa&=a{ni|UQ6$W=mxflt^!2*AFj39~113)g(>?i=@!KBgwKY$u7;&uQI zAkeZcjDTQ4Fl9HM#%98)svNkG$x)&~AO|NQhf0eB1du3z&R`Ls@>@+%2qT&R-Gikd zDI6jY%WzNT0shHe0kq^e8ZH{@UPyp`;l(TWsxSfy`H~`t zBS8Na6-@Dg5ZOEcf`ubtG^8yGVvB*JFi0E*XAMCkQAh*|jX>JLP)I!14v$1ZzCKW8 zHC}WK-jC$=wU+WkfW`_096SP%l#~QdvVpUCbOZ{A!y%Ap1R4!fX2AF&mVhdRvH0do z3?zV0<1sh_2Ac&@F;b)02?7FCsr2s_n4E94EdJMPQeGHBNaY|AmRWBKY-6p;L((Wi!oP~;^2uqfGS|~0@&>MrCaogWeeE+ST+Yj z^vA+c5DJyXV5uTs5EKgDgT)t6Sv0_dM1U$e;0#7Io=mhSy4Yh;SXZPQ3PncYFen@u z<4SaK!=mgkuBas}iA_sj0xZE2Hu@hd`ny<_8JHYpWfH(+Bm&WHJT?>ZrD;6lyIL@A z-{t#?jsCtC2wEr6QQb_3^)%Kflm4|QE2UtqK^OVL0Z+vkT1X|JTL2?NY z_D>Y1h;xAr8N)9I6Q2k22W`809*31bozx2g`|212&|dw9P~YC8+14&r16Ak-9a3!K zRHb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 22:20:59 -0700 Subject: [PATCH 015/240] use different icon --- xwords4/android/XWords4/res/menu/games_list_menu.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwords4/android/XWords4/res/menu/games_list_menu.xml b/xwords4/android/XWords4/res/menu/games_list_menu.xml index ee7917d74..98eaa3b55 100644 --- a/xwords4/android/XWords4/res/menu/games_list_menu.xml +++ b/xwords4/android/XWords4/res/menu/games_list_menu.xml @@ -13,7 +13,7 @@ /> Date: Wed, 16 Oct 2013 06:13:10 -0700 Subject: [PATCH 016/240] tap on selected item deselects rather than opening game --- .../XWords4/src/org/eehouse/android/xw4/GameListItem.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListItem.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListItem.java index 62f0c71ec..34a710ea8 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListItem.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListItem.java @@ -223,7 +223,12 @@ public class GameListItem extends LinearLayout setOnClickListener( new View.OnClickListener() { @Override public void onClick( View v ) { - m_cb.itemClicked( m_rowid, summary ); + // if selected, just un-select + if ( null != m_origDrawable ) { + toggleSelected(); + } else { + m_cb.itemClicked( m_rowid, summary ); + } } } ); From dab8ba88e5af18aa279f0c875d7cb87775fa2774 Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 16 Oct 2013 06:20:01 -0700 Subject: [PATCH 017/240] use darker selection color from alarm clock app, which has a similar dark theme. --- xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java index 7d046bd29..27fba48bf 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java @@ -43,7 +43,7 @@ public class XWApp extends Application { public static final String SMS_PUBLIC_HEADER = "-XW4"; public static final int MAX_TRAY_TILES = 7; // comtypes.h - public static final int SEL_COLOR = Color.argb( 0xFF, 0xCF, 0XE9, 0XF3 ); + public static final int SEL_COLOR = Color.argb( 0xFF, 0x09, 0x70, 0x93 ); private static UUID s_UUID = null; private static Boolean s_onEmulator = null; From b6aa0e19a6007bc8fd74ca5bf73c4d9cb1042997 Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 16 Oct 2013 06:20:10 -0700 Subject: [PATCH 018/240] tweak text --- .../XWords4/src/org/eehouse/android/xw4/GamesList.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java index c5e51d23f..d2f161cf6 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java @@ -786,9 +786,10 @@ public class GamesList extends XWExpandableListActivity if ( R.id.list_item_delete == menuID || R.id.list_item_config == menuID ) { - showOKOnlyDialog( "This menu is going away soon. Please select games" - + " by tapping the left icons then use action bar" - + " or the screen menu to operate on the selection."); + showOKOnlyDialog( "This menu item is going away soon. Please select" + + " games by tapping the left icons then use" + + " action bar icons or the screen menu to operate" + + " on the selection." ); } else { if ( checkWarnNoDict( m_rowid ) ) { switch ( menuID ) { From 9d6facce8410336ae1dff0e185cfd93648b7138d Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 16 Oct 2013 07:21:34 -0700 Subject: [PATCH 019/240] name the number of selected games in delete confirm dialog --- xwords4/android/XWords4/res/values/strings.xml | 4 ++-- .../XWords4/src/org/eehouse/android/xw4/GamesList.java | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml index d3d9e536f..32482c8d8 100644 --- a/xwords4/android/XWords4/res/values/strings.xml +++ b/xwords4/android/XWords4/res/values/strings.xml @@ -179,8 +179,8 @@ Are you sure you want to delete this game? - Are you sure you want to delete - all selected games? This action cannot be undone. + Are you sure you want to delete + the %d selected game[s]? This action cannot be undone. diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java index d2f161cf6..286f30c8c 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java @@ -711,7 +711,9 @@ public class GamesList extends XWExpandableListActivity break; case R.id.gamel_menu_delete: - showConfirmThen( R.string.confirm_seldeletes, R.string.button_delete, + String msg = Utils.format( this, R.string.confirm_seldeletesf, + m_selected.size() ); + showConfirmThen( msg, R.string.button_delete, GamesActions.DELETE_SELGAMES.ordinal() ); break; From f4160c178dc168d525ac596102eef91e0949ffef Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 16 Oct 2013 07:36:36 -0700 Subject: [PATCH 020/240] hide Add button/menuitem when there's a selection --- .../android/XWords4/src/org/eehouse/android/xw4/GamesList.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java index 286f30c8c..5ae2b65a2 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java @@ -686,6 +686,8 @@ public class GamesList extends XWExpandableListActivity } int nSelected = m_selected.size(); + + Utils.setItemVisible( menu, R.id.gamel_menu_newgame, 0 == nSelected ); Utils.setItemVisible( menu, R.id.gamel_menu_delete, 0 < nSelected ); Utils.setItemVisible( menu, R.id.listl_item_config, 1 == nSelected ); From 85382c982c3e8327ad2ac12dc6c939fe79f7e665 Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 16 Oct 2013 08:13:18 -0700 Subject: [PATCH 021/240] remove words from main games list. People don't read them, and now there's a '+' in the menubar. --- .../android/XWords4/res/layout/game_list.xml | 48 ------------------- .../XWords4/res/values/common_rsrc.xml | 1 - .../android/XWords4/res/values/strings.xml | 19 +------- xwords4/android/XWords4/res/xml/xwprefs.xml | 5 -- .../org/eehouse/android/xw4/GamesList.java | 43 ----------------- .../eehouse/android/xw4/jni/CommonPrefs.java | 5 -- 6 files changed, 1 insertion(+), 120 deletions(-) diff --git a/xwords4/android/XWords4/res/layout/game_list.xml b/xwords4/android/XWords4/res/layout/game_list.xml index a5f0b947e..e04e62741 100644 --- a/xwords4/android/XWords4/res/layout/game_list.xml +++ b/xwords4/android/XWords4/res/layout/game_list.xml @@ -5,29 +5,6 @@ android:layout_width="fill_parent" android:layout_height="fill_parent" > - - - - - - - -