如何更改应用程序的启动动画? [英] How to Change the launch animation of an Application?

查看:52
本文介绍了如何更改应用程序的启动动画?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法以编程方式更改应用程序启动动画? 每当我启动应用程序时,它的动画效果就像来自屏幕底部,但我希望它来自屏幕顶部。

感谢任何帮助。

推荐答案

您可以简单地使用AlphaAnimation,并将其应用到您的活动布局中,如下所示,onCreate()方法:

super.onCreate(savedInstace);
this.setContentView(R.layout.main);
RelativeLayout layout = findViewById(R.id.idLayout);
AlphaAnimation animation = new AlphaAnimation(0.0f , 1.0f ) ;
animation.setFillAfter(true);
animation.setDuration(1200);
//apply the animation ( fade In  or whatever you want) to your LAyout
layout.startAnimation(animation);

这篇关于如何更改应用程序的启动动画?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆