转自 http://www.cnblogs.com/over140/archive/2010/09/07/1820876.html
核心代码如下,ActivityGroup继承自Activity
public class ActivityG extends ActivityGroup {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//
Intent i = new Intent(this,ActivityB.class);
//this.startActivity(i);
ActivityGroup ag = this;
LocalActivityManager alm = ag.getLocalActivityManager();
Window win = alm.startActivity("module1", i);
View view = win.getDecorView();
setContentView(view);
}
}