      1: package com.programmez.opengl.exercice1;

      3: import android.app.Activity;
      4: import android.opengl.GLSurfaceView;
      5: import android.os.Bundle;

      7: public class ExampleUnOpenGL extends Activity {

      9:         private GLSurfaceView mCubeSurfaceView;

     11:         @Override
     12:         public void onCreate(Bundle savedInstanceState) {
     13:                 super.onCreate(savedInstanceState);
     14:                 mCubeSurfaceView = new CubeSurfaceView(this);
     15:                 setContentView(mCubeSurfaceView);
     16:                 mCubeSurfaceView.setFocusableInTouchMode(true);
     17:                 mCubeSurfaceView.requestFocus();
     18:         }

     20:         @Override
     21:         protected void onPause() {
     22:                 super.onPause();
     23:                 mCubeSurfaceView.onPause();
     24:         }

     26:         @Override
     27:         protected void onResume() {
     28:                 super.onResume();
     29:                 mCubeSurfaceView.onResume();
     30:         }
     31: }