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) { } }); } }
添加动画
最新推荐文章于 2019-03-25 12:27:53 发布