I wanted to make a plain button in the menu act as a on/off button like a toggle button. But I'm not sure how I can make a single button act like a switch?
switch(item.getItemId()){
case R.id.switcher:
View view = this.getWindow().getDecorView();
view.setBackgroundColor(Color.parseColor("#80FFFFFF"));
//I want to change the color of the background by clicking once
//and set the background color back to normal. How will I achieve this ?
return true;