You can animate text color from standard color to transparent and vice versa.
ObjectAnimator colorAnim = ObjectAnimator.ofInt(myButton, "textColor", Color.RED, Color.TRANSPARENT); colorAnim.setDuration(1000); colorAnim.setEvaluator(new ArgbEvaluator()); colorAnim.setRepeatCount(ValueAnimator.INFINITE); colorAnim.setRepeatMode(ValueAnimator.REVERSE); colorAnim.start();
source share