title: .setBackgroundColor() not working outside click event
body: <p>I have a seemingly simple problem.  I am working with imagebuttons inside a linearlayout which is inside a scrollview.  I have set an onClickListener for one of the buttons which switches the color to red then transparent and then back again.  I have tried calling performClick() and manually coding a routine to fire when a condition is met.  The problem I am having is no matter how I try to do this the method(s) that are calling .setBackgroundColor() are all exiting when it's called.  I don't even get to see a return statement in my Log.  here is the code.  I am sure this is a simple fix but I am not familiar very familiar with these things.  Also I am not using any XML and would like to avoid it if possible so please keep that in mind when posting suggestions.  Thanks in advance!</p>
  
  <p>I will try to clarify what I am trying to accomplish.  I am attempting to emulate the events that are fired during a click event WITHOUT a click event happening.  I have tried this with performClick() and in the way I have here.  In both cases I have the call to .setBackgroundColor() not firing and prematurely exiting the method that is calling it and it is called in.</p>
  
  <p>After messing around a bit I found that the method will fire the setBackgroundColor() AND continue the method when I use Color.RED when it is already the color red.  If I try any other colors it doesn't work.  So it appears to not want to change the color in this fashion.  Any ideas anyone?</p>
  
  <p>here is the handler:</p>
  
  <pre><code>IBFireBall.setOnClickListener(new OnClickListener() {
  
              public void onClick(View v) {
                  Log.d(TAG, "in onClick");
                  if (Fireball.activated) {
                      Fireball.activated = false;
                      AbilityWidget.IBFireBall.setBackgroundColor(0);
                      Log.d(TAG, "was activated");
                  } else {
                      Level.fireBall = new Fireball(context);
                      Fireball.activated = true;
                      AbilityWidget.IBFireBall.setBackgroundColor(Color.RED);
                      Log.d(TAG, "wasn't activated");
                  }
  
              }
  
          });
  </code></pre>
  
  <p>here is the other method Log only prints out 1 and 2:</p>
  
  <pre><code>public static void resetButton(String id) {
  
      if (id.equals("Fireball")) {
  
          if (Fireball.activated) {
              Log.d(TAG,"inside resetbutton 1");
              Fireball.activated = false;
              Log.d(TAG,"inside resetbutton2" );
              AbilityWidget.IBFireBall.setBackgroundColor(0);
              Log.d(TAG,"inside resetbutton4" );
  
          } else {
  
              Level.fireBall = new Fireball(context);
              Fireball.activated = true;
              AbilityWidget.IBFireBall.setBackgroundColor(Color.RED);
              Log.d(TAG, "wasn't activated");
          }
  
      }
  }
  </code></pre>