diff --git a/xwords4/android/XWords4/res/menu/board_menu.xml b/xwords4/android/XWords4/res/menu/board_menu.xml index 0b75e22b0..5a881899d 100644 --- a/xwords4/android/XWords4/res/menu/board_menu.xml +++ b/xwords4/android/XWords4/res/menu/board_menu.xml @@ -6,6 +6,7 @@ - + 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 91690df21..9134ac6a3 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java @@ -738,15 +738,22 @@ public class BoardActivity extends XWActivity item.setTitle( strId ); } + Utils.setItemVisible( menu, R.id.board_menu_undo_last, !inTrade ); + Utils.setItemVisible( menu, R.id.board_menu_tray, !inTrade ); + Utils.setItemVisible( menu, R.id.board_submenu_game, !inTrade ); + if ( !inTrade ) { + boolean enabled = null == m_gsi || m_gsi.curTurnSelected; item = menu.findItem( R.id.board_menu_done ); - if ( 0 >= m_view.curPending() ) { - strId = R.string.board_menu_pass; - } else { - strId = R.string.board_menu_done; + item.setVisible( enabled ); + if ( enabled ) { + if ( 0 >= m_view.curPending() ) { + strId = R.string.board_menu_pass; + } else { + strId = R.string.board_menu_done; + } + item.setTitle( strId ); } - item.setTitle( strId ); - item.setEnabled( null == m_gsi || m_gsi.curTurnSelected ); } if ( m_gameOver || DBUtils.gameOver( this, m_rowid ) ) { @@ -1796,6 +1803,8 @@ public class BoardActivity extends XWActivity m_view.setInTrade( m_inTrade ); } adjustTradeVisibility(); + Activity self = BoardActivity.this; + Utils.invalidateOptionsMenuIf( self ); } break; case JNIThread.GOT_WORDS: