80,472
社区成员




public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LinearLayout layout=new LinearLayout(this);
SurfaceView surfaceView =new SurfaceView(this);
layout.addView(surfaceView);
setContentView(layout); //设置显示为layout
//跳转时先删除
layout.removeAllViews();
GLSurfaceView glSurfaceView=new GLSurfaceView(this);
layout.addView(glSurfaceView);
setContentView(layout);
}