Widget - FAB Color Animation

final ObjectAnimator animator = ObjectAnimator.ofInt(_fab, "backgroundTint", Color.rgb(0, 121, 107), Color.rgb(226, 143, 34));

animator.setDuration(2000L);
animator.setEvaluator(new ArgbEvaluator());
animator.setInterpolator(new DecelerateInterpolator(2));
animator.addUpdateListener(new ObjectAnimator.AnimatorUpdateListener() {
    @Override
    public void onAnimationUpdate(ValueAnimator animation) {
        int animatedValue = (int) animation.getAnimatedValue();
        _fab.setBackgroundTintList(android.content.res.ColorStateList.valueOf(animatedValue));
    }
});
animator.start();

Komentar

Cara pembuatan Apps paling Populer

Create Stopwatch App in Android using Sketchware

TextInputLayout in Sketchware

How to find and​ highlight a word in a text field in Sketchware?

A Flash Light App in Sketchware

How to enable download in webview in Sketchware apps?

Intent - Open File By Type

Code for implementing Notifications in Sketchware

How to share an image from Drawable folder?

ActionBar back button

Animation Transtition Animation