android menu code not working
I have been trying to figure out why my boolean is not changing when I press the button, when I changed it manually it worked, but it doesn't do any thing. I have tried to follow tutorials to the word but they don't work. Can anybody point out where I am going wrong? public boolean onOptionsItemSelected(MenuItem menu) { MenuItem freeze = (MenuItem)findViewById(R.id.freeze); // Handle item selection switch (menu.getItemId()) { case R.id.freeze: if (freze == false){ freze = true; } else { freze = false; } return true; case R.id.toggleVolCount: if (toggleVol == true){ toggleVol = false; } else {