0

I am trying to disable one of the options menu items using the foll code:

public boolean onPrepareOptionsMenu (Menu menu){
     menu.findItem(R.id.menu_item_id).setEnabled(false);
     return true;
}

However after the method is executed, disabled item looks just like the rest (enabled) of the menu.

Is it possible to make it look disabled (grayed out or something)? How?

Thanks in advance

Asahi
  • 13,378
  • 12
  • 67
  • 87

1 Answers1

0

Have you looked at Themes? Check out this post: How to change the Text color of Menu item in Android?

Once you set up a Theme, you may find this helpful for finding what values can be set: Themes XML

Community
  • 1
  • 1
Tanner Perrien
  • 3,133
  • 1
  • 28
  • 35