title: Changing background of button depending on current background
body: <p>I'm trying to change the background of a button when it's clicked but also be able to change it back when it's clicked again. What I'm trying to do is get the buttons current background and if it is (xxxxx) then change it to (yyyyy). I can't seem to find how to get the button's current background and compare it to one of my drawable resources.<br>
  Any help would be much appreciated.</p>
  
  <p>Some pseudo code of what I'm trying to do:</p>
  
  <pre><code>if (button1.getBackground() == R.drawable.someDrawable) {
     button1.setBackgroundResource(R.drawable.someOtherDrawable);
  }
  </code></pre>