Android之渐变动画

笔记酒吧 

/**
 * 渐变动画
 */
private void crossfade() {

    open_lock.setAlpha(0f);
    open_lock.setVisibility(View.VISIBLE);

    open_lock.animate()
            .alpha(1f)
            .setDuration(10000)
            .setListener(null);

    send_password.animate()
            .alpha(0f)
            .setDuration(20000)
            .setListener(new AnimatorListenerAdapter() {
                @Override
                public void onAnimationEnd(Animator animation) {
                    open_lock.setVisibility(View.GONE);
                }
            });
}
 

你可能感兴趣的:(Android)