protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.test); imageView = (ImageView) findViewById(R.id.imageview); AlphaAnimation animal = new AlphaAnimation(0.3f,1.0f);//设置的透明度,渐变的效果 animal.setDuration(3000);//设置动画时间 imageView.startAnimation(animal); animal.setAnimationListener(new Animation.AnimationListener() { @Overridepublic void onAnimationStart(Animation animation) {
} @Override public void onAnimationEnd(Animation animation) { startActivity(new Intent(TestActivity.this,HandlerTest.class));//动画效果完成后所要进入的主程序 finish(); } @Override public void onAnimationRepeat(Animation animation) { } }); }
Android 启动程序时,进入的动态效果
最新推荐文章于 2022-09-02 04:41:50 发布