android ActivityGroup中跳转activity的关键代码

	LinearLayout container = (LinearLayout)((ActivityGroup)getParent()).getWindow().findViewById(R.id.body);//注意这里,还是获取group的view
        container.removeAllViews();
        Intent intent=new Intent(a.this,b.class);
        intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        Window subActivity=((ActivityGroup)a.this.getParent()).getLocalActivityManager().startActivity(“locallist”,intent);
        container.addView(subActivity.getDecorView());   

你可能感兴趣的:(android ActivityGroup中跳转activity的关键代码)