I'm new to Java and Android. I have a seat reservation system. Each seat is represent using a button. 

What I want to do is when user presses the button button should change it's color (blue->yellow) and the name of the button should be passed on to a array. If user presses that button again color of the button should go back to previous state and the value should be removed from the array.

How I can do this?