Code example for GLSurfaceView

Methods: getHoldersetZOrderOnTop, bringChildToFront, getParent, setEGLConfigChooser, setEGLContextClientVersion, setRenderer

0
	@Override 
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
         
        glView = new GLSurfaceView(this);
        // Create an OpenGL ES 2.0 context. 
        glView.setEGLContextClientVersion(2);
        //rgba_8888 
        glView.setEGLConfigChooser(8, 8, 8, 8, 16, 0);
        // Set the Renderer for drawing on the GLSurfaceView 
        glView.setRenderer(new MyGLRenderer());
         
        setContentView(glView);
         
        //set translucent view 
        glView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
        // put glView on the top of window 
        glView.setZOrderOnTop(true);
 
        mapView = new MapView(this);
        mapView.onCreate(savedInstanceState);
         
        addContentView(mapView, 
        		new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT , ViewGroup.LayoutParams.MATCH_PARENT));
        glView.getParent().bringChildToFront(glView);
 
        setUpMapIfNeeded(); 
 
        ViewServer.get(this).addWindow(this);
	}