public class LogoActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_logo); AnimationSet animationSet = (AnimationSet) AnimationUtils.loadAnimation(this, R.anim.tran); ImageView imageView = (ImageView) findViewById(R.id.logoImage); imageView.startAnimation(animationSet); animationSet.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { } @Override public void onAnimationEnd(Animation animation) { Intent intent = new Intent(LogoActivity.this, MainActivity.class); startActivity(intent); finish(); } @Override public void onAnimationRepeat(Animation animation) { } }); } }
添加动画

最新推荐文章于 2023-11-24 15:00:16 发布