Android的:先从动画应用程序 [英] Android: start the app with animation

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

问题描述

我有一个通过点击网页中的链接启动一个应用程序。

I have an app that is launched by clicking a link in a webpage.

没有问题,工作正常。

No problem, that works fine.

不过,应用主屏只是有点颠簸而去浏览器。我想补充一点的动画。也许它可以淡入或东西。我已经做了ImageView的补间动画,但不知道如何做到这一点的完整布局屏幕。任何想法?

However, the app main screen just sort of bumps away the browser. I'd like to add a little animation. Maybe it can fade-in or something. I have done tween animations on ImageView but not sure how to do it for the full layout screen. Any ideas?

推荐答案

我想你可以简单地使用AlphaAnimation,并将其应用到你的活动这样的布局,在onCreate方法:

i think you can simply use the AlphaAnimation , and apply it to the layout of your Activity like this , in the onCreate method :

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

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

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