Android 启动画面旋转或漩涡

Pla*_*ooz 2 android splash-screen

嗨,我很好奇是否有人知道spin/swirl在第一次运行应用程序时制作启动画面的方法。我想要旋转/漩涡的图像是一个 png。

Rob*_*ond 5

对于漩涡,您必须创建自己的动画,但对于旋转,您只需为 ImageView 设置动画。

RotateAnimation animation = new RotateAnimation(0f, 360f);
anim.setRepeatCount(Animation.INFINITE);
anim.setDuration(1000);

ImageView imageView= (ImageView) findViewById(R.id.splash_screen);
imageView.startAnimation(animation);
Run Code Online (Sandbox Code Playgroud)

您可以使用AnimationRotateAnimation 的其他方法来自定义动画。