Code example for View

Methods: setAlpha

0
                    private boolean mCanceled;
                    @Override 
                    public void onAnimationCancel(Animator animation) {
                        // Fail safe and show the emergency button in onAnimationEnd() 
                        mCanceled = true;
                        ecaView.setAlpha(1f);
                    } 
                    @Override 
                    public void onAnimationEnd(Animator animation) {
                        ecaView.setVisibility(mCanceled ? View.VISIBLE : View.INVISIBLE);
                    } 
                }); 
                anim.start();
            } else { 
                ecaView.setAlpha(0f);
                ecaView.setVisibility(View.INVISIBLE);
            } 
        } 
        if (bouncerFrame != null) {
            if (duration > 0) {
                Animator anim = ObjectAnimator.ofInt(bouncerFrame, "alpha", 0, 255);