mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
remove method and use existing Util static instead
This commit is contained in:
parent
968b1ba321
commit
3e6791c66f
1 changed files with 17 additions and 18 deletions
|
@ -745,16 +745,23 @@ public class BoardActivity extends XWActivity
|
|||
item = menu.findItem( R.id.board_menu_tray );
|
||||
item.setTitle( strId );
|
||||
|
||||
hideShowItem( menu, R.id.board_menu_flip, m_gsi.visTileCount >= 1 );
|
||||
hideShowItem( menu, R.id.board_menu_toggle, m_gsi.visTileCount >= 1 );
|
||||
hideShowItem( menu, R.id.board_menu_juggle, m_gsi.canShuffle );
|
||||
hideShowItem( menu, R.id.board_menu_undo_current, m_gsi.canRedo );
|
||||
hideShowItem( menu, R.id.board_menu_hint_prev, m_gsi.canHint );
|
||||
hideShowItem( menu, R.id.board_menu_hint_next, m_gsi.canHint );
|
||||
hideShowItem( menu, R.id.board_menu_chat,
|
||||
BuildConstants.CHAT_SUPPORTED && m_gsi.canChat );
|
||||
hideShowItem( menu, R.id.board_menu_tray,
|
||||
!inTrade && m_gsi.canHideRack );
|
||||
Utils.setItemVisible( menu, R.id.board_menu_flip,
|
||||
m_gsi.visTileCount >= 1 );
|
||||
Utils.setItemVisible( menu, R.id.board_menu_toggle,
|
||||
m_gsi.visTileCount >= 1 );
|
||||
Utils.setItemVisible( menu, R.id.board_menu_juggle,
|
||||
m_gsi.canShuffle );
|
||||
Utils.setItemVisible( menu, R.id.board_menu_undo_current,
|
||||
m_gsi.canRedo );
|
||||
Utils.setItemVisible( menu, R.id.board_menu_hint_prev,
|
||||
m_gsi.canHint );
|
||||
Utils.setItemVisible( menu, R.id.board_menu_hint_next,
|
||||
m_gsi.canHint );
|
||||
Utils.setItemVisible( menu, R.id.board_menu_chat,
|
||||
BuildConstants.CHAT_SUPPORTED
|
||||
&& m_gsi.canChat );
|
||||
Utils.setItemVisible( menu, R.id.board_menu_tray,
|
||||
!inTrade && m_gsi.canHideRack );
|
||||
}
|
||||
|
||||
Utils.setItemVisible( menu, R.id.board_menu_invite, 0 < m_missing );
|
||||
|
@ -2184,14 +2191,6 @@ public class BoardActivity extends XWActivity
|
|||
null != m_gi.dictName( m_view.getCurPlayer() ) );
|
||||
}
|
||||
|
||||
private void hideShowItem( Menu menu, int id, boolean visible )
|
||||
{
|
||||
MenuItem item = menu.findItem( id );
|
||||
if ( null != item ) {
|
||||
item.setVisible( visible );
|
||||
}
|
||||
}
|
||||
|
||||
private void adjustTradeVisibility()
|
||||
{
|
||||
m_toolbar.setVisibility( m_inTrade? View.GONE : View.VISIBLE );
|
||||
|
|
Loading…
Reference in a new issue