Code example for GLSurfaceView

Methods: onResume

0
    protected void onResume() { 
        // Ideally a game should implement onResume() and onPause() 
        // to take appropriate action when the activity looses focus 
        super.onResume(); 
        mRenderer.start();
        mGLSurfaceView.onResume();
    } 
 
    @Override 
    protected void onPause() { 
        // Ideally a game should implement onResume() and onPause() 
        // to take appropriate action when the activity looses focus 
        super.onPause(); 
        mRenderer.stop();
        mGLSurfaceView.onPause();
    } 
 
 
    class MyRenderer implements GLSurfaceView.Renderer, SensorEventListener {
        private Cube mCube;
Stop searching for code, let great code find you!  Add Codota to your java IDE