title: Android, How to use animation in order to show blinking?
body: <p>In my application, I have recording button. I want when user clicks on it each one second i change the background in order to simulate blinking. I created a handler and set it to 1 second therefore each one second this handler runs. Here i change the background. this my code:</p>
  
  <pre><code>mUpdateUITimerTask = new Runnable() {
              public void run() {
  
                  // Simulating blinking for capture button
                  if(bolToggle) {
                      bolToggle = false;
                      captureButton.setBackgroundDrawable(getResources().getDrawable(R.drawable.btn_record_blink));
                  } else {
                      bolToggle = true;
                      captureButton.setBackgroundDrawable(getResources().getDrawable(R.drawable.btn_record));
                  }
  
                  mHandler.postDelayed(mUpdateUITimerTask, 1000);
              }
          };
  </code></pre>
  
  <p>When I run the app i see the changes but its not clear. buttons are like this:
  <img src="https://i.stack.imgur.com/3Oprm.png" alt="enter image description here"></p>
  
  <p>When i run the application, red image is showing ok but for white image, it shows red image with a little white halo around it.
  I tried to put <code>captureButton.setBackgroundColor(Color.TRANSPARENT);</code> before setting background but result was same.</p>
  
  <p>any suggestion would be appreciated. Thank you.</p>