Skip to content

Instantly share code, notes, and snippets.

@hitherejoe
Last active November 17, 2015 08:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hitherejoe/1ba19d055ebab449b820 to your computer and use it in GitHub Desktop.
Save hitherejoe/1ba19d055ebab449b820 to your computer and use it in GitHub Desktop.
private void animateForegroundColor(@ColorInt final int targetColor) {
ObjectAnimator animator =
ObjectAnimator.ofInt(YOUR_VIEW, FOREGROUND_COLOR, Color.TRANSPARENT, targetColor);
animator.setEvaluator(new ArgbEvaluator());
animator.setStartDelay(DELAY_COLOR_CHANGE);
animator.start();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment