Hi EgonOlsen
i checked my project again. Now, i will descript more detail:
- I used FrameLayout to display a SurfaceView and a GLSurfaceView with SurfaceView is on the top.
- On my test project, everything was fine.
- On my main project, everything works, except SurfaceView cannot display on the top. The differrent thing bettwen the test project and the main project is in the main project , glSufaceView must take a long time to load resources. When i try to set transparenct background for glSurfaceView, i can see a part of SurfaceView at black color areas on glSurfaceView.
- The main project is fine on emulator but on IS03, Nexus I
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SCREEN_WIDTH=getWindowManager().getDefaultDisplay().getWidth();
SCREEN_HEIGHT=getWindowManager().getDefaultDisplay().getHeight();
requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
fLayout= new FrameLayout(getApplicationContext());
glSurfaceView = new GLSurfaceView(getApplication());
glSurfaceView.setEGLConfigChooser(8, 8, 8, 8, 16, 0);
glSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
renderer= new RendererImplement();
renderer.loadTextures(getResources());
glSurfaceView.setRenderer(renderer);
screenSurface= new mySurfaceView(getApplicationContext());
screenSurface.getHolder().setFormat(PixelFormat.RGBA_8888);
fLayout.addView(screenSurface);
fLayout.addView(glSurfaceView);
setContentView(fLayout);
}