我要添加幻灯片切换的动画而的ActivityGroup内变化的活动。我已经使用下面的函数来改变使用目的的活动:
I want to add slide transition animation while changing activities within a ActivityGroup. I have used following function to change activities using intent:
public void replaceContentView(String id, Intent newIntent) {
View view = getLocalActivityManager().startActivity(id,
newIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP))
.getDecorView();
history.add(view);
this.setContentView(view);
}
任何建议我怎么能做到这一点?
Any suggestion how can I do that?
添加动画视图
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);
}