闪屏进入界面

AnimationSet animationSet = new AnimationSet(true);
AlphaAnimation alphaAnimation = new AlphaAnimation(0, 1);
alphaAnimation.setDuration(2000);
//animationSet.setFillEnabled(true);
//animationSet.setFillAfter(true);
//animationSet.setFillBefore(true);
animationSet.addAnimation(alphaAnimation);
iv_splash.setAnimation(animationSet);

animationSet.setAnimationListener(new Animation.AnimationListener() {
    @Override
    public void onAnimationStart(Animation animation) {

    }

    @Override
    public void onAnimationEnd(Animation animation) {
        startActivity(new Intent(SplashActivity.this,MainActivity.class));
        finish();
    }

    @Override
    public void onAnimationRepeat(Animation animation) {

    }
});

你可能感兴趣的:(技术总结)