Skip to content

Instantly share code, notes, and snippets.

@fluktuid
Last active May 12, 2017 20:29
Show Gist options
  • Save fluktuid/dbf2fd7f55b66dc7a6c6f1ec7b0c650e to your computer and use it in GitHub Desktop.
Save fluktuid/dbf2fd7f55b66dc7a6c6f1ec7b0c650e to your computer and use it in GitHub Desktop.
This method makes the given View fashing
public void blizz(int millis, View v) {
ColorDrawable[] BackGroundColor = {
new ColorDrawable(Color.parseColor("#ffffff")), // 40% 102
new ColorDrawable(Color.parseColor("#000000")) // 0%
};
TransitionDrawable td = new TransitionDrawable(BackGroundColor);
v.setBackground(td);
td.startTransition(1500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment