开始一个新的活动,没有过渡动画中的Andr​​oid 1.6 [英] Start a new activity with no transition animation in android 1.6

查看:124
本文介绍了开始一个新的活动,没有过渡动画中的Andr​​oid 1.6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,从API级别5有可能在意图prevent当我开始一个新的活动正在应用的正常动画指定一个标志:

I am aware that from API level 5 it is possible to specify a flag in the intent to prevent the normal animation being applied when I start a new activity:

myIntent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);

不过,我的问题是:有没有办法实现一个应用程序一样的东西支持Android 1.6的

However, my question is: is there a way to achieve the same thing in an app supporting android 1.6?

推荐答案

使用这样的: getWindow()setWindowAnimations(0)活动正在启动。

Use this: getWindow().setWindowAnimations(0); within the Activity that is starting.

这篇关于开始一个新的活动,没有过渡动画中的Andr​​oid 1.6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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