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:
I have tried to make a ScaleAnimation, doing the button grow, but of course, it makes grow all the button.
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;
}
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.
Util.adjustAlpha(mColor, 0.4f)
method – Loathe