如何解决启动画面动画循环开始
我有一个简单的闪屏动画活动,我添加了 public class loadingScreen extends AppCompatActivity {
Animation topAnimation,bottomAnimation,middleAnimation;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_loading_screen);
ButterKnife.bind(this);
topAnimation = AnimationUtils.loadAnimation(loadingScreen.this,R.anim.slide_down);
bottomAnimation = AnimationUtils.loadAnimation(loadingScreen.this,R.anim.bottom_up);
middleAnimation = AnimationUtils.loadAnimation(loadingScreen.this,R.anim.fade_in2);
final ImageView image1 = findViewById(R.id.image1);
final ImageView image2 = findViewById(R.id.image2);
final ImageView image3 = findViewById(R.id.image3);
final ImageView image4 = findViewById(R.id.image4);
final ImageView image5 = findViewById(R.id.image5);
final ImageView image6 = findViewById(R.id.image6);
final TextView text1 = findViewById(R.id.app_title);
final TextView text2 = findViewById(R.id.app_desc);
text1.setAnimation(middleAnimation);
text2.setAnimation(middleAnimation);
image1.setAnimation(topAnimation);
image2.setAnimation(topAnimation);
image3.setAnimation(topAnimation);
image4.setAnimation(bottomAnimation);
image5.setAnimation(bottomAnimation);
image6.setAnimation(bottomAnimation);
int SPLASH_TIME_OUT = 1500;
new Handler().postDelayed(() -> {
Intent intent = new Intent(loadingScreen.this,MainActivity.class);
startActivity(intent);
finish();
},SPLASH_TIME_OUT);
}
}
来传递意图启动活动,但我发现动画中有一个循环 here is a video displaying the loop
代码:
splashScreen
我不知道为什么我会在动画结束时出现循环。
如果我尝试使用带有空 Main activity
的 golem::create_golem()
的应用程序,我在结尾处看不到循环。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。