首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

ActivityGroup中施用切换动画

2012-07-01 
ActivityGroup中使用切换动画在stack上面发现的方法,分享给大家,功能是在activitygroup切换子activity时候

ActivityGroup中使用切换动画
在stack上面发现的方法,分享给大家,功能是在activitygroup切换子activity时候加载补间动画,代码如下:

public void replaceContentView(String id, Intent newIntent) {View view = getLocalActivityManager().startActivity(id,newIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView();Animation hyperspaceJump = AnimationUtils.loadAnimation(this,R.anim.myanimation);view.startAnimation(hyperspaceJump);history.add(view);this.setContentView(view);}

热点排行