You can do something simple like I did. Just change the text to what is needed when the menu item is touched. I needed to turn the sound off and on, plus the ability to perform an action by touching it. Here is my code:
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.audioOn:
audioOn = !audioOn;
if (audioOn)
item.setTitle("Audio Off");
else
item.setTitle("Audio On");
return true;
case R.id.touchOn:
touchOn = !touchOn;
if (touchOn)
item.setTitle("Touch Off");
else
item.setTitle("Touch On");
return true;
default:
return super.onOptionsItemSelected(item);
}
}
audioOn and touchOn are booleans checked in other parts of the code. Hope this helps.