Code example for ArgbEvaluator

Methods: ofObject

        final float alpha = a; 
        ValueAnimator anim = null; 
        if (v.getBackground() instanceof BackgroundAlphaColorDrawable) { 
            final BackgroundAlphaColorDrawable bg = (BackgroundAlphaColorDrawable) v 
            anim = ValueAnimator.ofObject(new ArgbEvaluator(), info.color, 
                    BackgroundAlphaColorDrawable.applyAlphaToColor(bg.getBgColor(), alpha)); 
            anim.addUpdateListener(new AnimatorUpdateListener() { 
                public void onAnimationUpdate(ValueAnimator animation) { 
                    info.color = (Integer) animation.getAnimatedValue(); 
        } else { 
            // custom image is set by the theme, let's just apply the alpha if we can. 
            return null; 
        anim.addListener(new AnimatorListener() { 
Experience pair programming with AI  Get Codota for Java