在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);
}