allow missing items -- since menus are different on different devices

This commit is contained in:
Eric House 2013-12-01 20:40:04 -08:00
parent 3e6791c66f
commit a4fe0adb62

View file

@ -351,7 +351,9 @@ public class Utils {
public static void setItemVisible( Menu menu, int id, boolean enabled )
{
MenuItem item = menu.findItem( id );
item.setVisible( enabled );
if ( null != item ) {
item.setVisible( enabled );
}
}
public static void setItemEnabled( Menu menu, int id, boolean enabled )