`
malong26
  • 浏览: 167048 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

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);
	}
分享到:
评论
2 楼 tanghaigo 2013-03-15  
谢谢,正好有用
1 楼 hpf_888 2012-06-27  
正好解决了我的一个问题。 

相关推荐

Global site tag (gtag.js) - Google Analytics