How do you animate the change of background color of a view on Android?
For example:
I have a view with a red background color. The background color of the
add a folder animator into res folder. (the name must be animator). Add an animator resource file. For example res/animator/fade.xml
Inside Activity java file, call this
View v = getWindow().getDecorView().findViewById(android.R.id.content);
AnimatorSet set = (AnimatorSet) AnimatorInflater.loadAnimator(this, R.animator.fade);
set.setTarget(v);
set.start();