title: Flashing textview background in android for 1 second only once
body: <p>i want flash my textview background for some interval (1000 ms), this one is killing me as i found solutions only for blinking text continuously . However i have tried this below code and it works only for first time , but  when i refresh the data after 10 seconds, it dosent flash, simply changes the color.</p>
  
  <pre><code>private void setBackgroundFlash(final TextView textView,
          final double oldValue, final double newValue) {
  
      if (oldValue &gt; newValue)
          textView.setBackgroundColor(COLOR_FLASH_RED);
      else if (oldValue &lt; newValue)
          textView.setBackgroundColor(COLOR_FLASH_GREEN);
      else if (oldValue == newValue)
          textView.setBackgroundResource(Color.TRANSPARENT);
  
      CountDownTimer timerForTextFlash = new CountDownTimer(1000, 100) {
  
          @Override
          public void onTick(long millisUntilFinished) {
  
          }
  
          @Override
          public void onFinish() {
              textView.setBackgroundResource(Color.TRANSPARENT);
          }
  
      };
      timerForTextFlash.start();
  }
  </code></pre>