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) { } });
闪屏进入界面
最新推荐文章于 2020-09-02 16:32:43 发布