title: Pulsating button animation in Android
body: <p>I'm working with a Voice recognition application and I want to make my play/stop button "pulse" when it's recording. Something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/l9v2O.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/l9v2O.jpg" alt="enter image description here"></a></p>
  
  <p>I have tried to make a ScaleAnimation, doing the button grow, but of course, it makes grow all the button. </p>
  
  <pre><code>   public static ObjectAnimator pulseAnimation(ImageView target){
  
      ObjectAnimator scaleDown = ObjectAnimator.ofPropertyValuesHolder(target,
              PropertyValuesHolder.ofFloat("scaleX", 1.1f),
              PropertyValuesHolder.ofFloat("scaleY", 1.1f));
      scaleDown.setDuration(310);
      scaleDown.setRepeatCount(ObjectAnimator.INFINITE);
      scaleDown.setRepeatMode(ObjectAnimator.REVERSE);
  
      return scaleDown;
  }
  </code></pre>
  
  <p>So the idea is achieve something like that but just with a alpha behind the actual button. I want to know if it's possible to do this with an alpha animation or something before add a second "Alpha Button" behind my button to make it grow and achieve this effect.</p>