I have a question similar to this but I am wanting to make only the text on the button flash. I don't want the button background to also flash.
This is my R.anim.blink.xml file:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha android:fromAlpha="0.0"
android:toAlpha="1.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="500"
android:startOffset="20"
android:repeatMode="reverse"
android:repeatCount="infinite"/>
</set>
But this code...
Animation blinkingAnimation = AnimationUtils.loadAnimation(this, R.anim.blink);
myButton.setAnimation(blinkingAnimation);
...makes the whole button blink. So how to make just the text blink (so the button background is shown all the time)?
ObjectAnimator
? – Nappie