mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-01 06:19:57 +01:00
hide a couple of message-related menuitems for standalone games
This commit is contained in:
parent
9eea15185c
commit
7621b909c3
2 changed files with 13 additions and 0 deletions
|
@ -693,6 +693,11 @@ public class BoardActivity extends XWActivity
|
|||
item.setTitle( R.string.board_menu_game_final );
|
||||
}
|
||||
|
||||
if ( DeviceRole.SERVER_STANDALONE == m_gi.serverRole ) {
|
||||
Utils.setItemVisible( menu, R.id.board_menu_game_resend, false );
|
||||
Utils.setItemVisible( menu, R.id.gamel_menu_checkmoves, false );
|
||||
}
|
||||
|
||||
return true;
|
||||
} // onPrepareOptionsMenu
|
||||
|
||||
|
|
|
@ -40,6 +40,8 @@ import android.net.Uri;
|
|||
import android.provider.ContactsContract.PhoneLookup;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
|
@ -345,6 +347,12 @@ public class Utils {
|
|||
}
|
||||
}
|
||||
|
||||
public static void setItemVisible( Menu menu, int id, boolean enabled )
|
||||
{
|
||||
MenuItem item = menu.findItem( id );
|
||||
item.setVisible( enabled );
|
||||
}
|
||||
|
||||
public static boolean hasSmallScreen( Context context )
|
||||
{
|
||||
if ( null == s_hasSmallScreen ) {
|
||||
|
|
Loading…
Reference in a new issue