How to change Android button color onClick?
<p>I wanted to change the android button color every time I click on a button. Once a user clicks a button, I want it so that the color changes. Then, when the button is pressed again, the color reverts back to what it was before. Here is my attempt:</p>

<pre><code>private void setupFollowButton(Button button, final Boolean isClicked) {
    button.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            Boolean isClickedDummy = !isClicked;
            if(isClickedDummy) {
                v.setBackgroundColor(Color.parseColor("#FF0000"));
            } else {
                v.setBackgroundColor(Color.parseColor("#FFFFFF"));
            }
        }
    });
}
</code></pre>

<p>Originally I wanted it so that <code>isClicked = !isClicked</code> so that I would know for certain that the <code>isClicked</code> variable has changed and I can change the color. However, the method I have above only changes the <code>isClicked</code> to false and I can't seem to change it back to <code>true</code>. Is there any way I can figure this out? Any help would be appreciated. Thanks!</p>