FileDocCategorySizeDatePackage
GLSurfaceViewActivity.javaAPI DocGoogle Android v1.5 Example9402Sun Nov 11 13:01:04 GMT 2007com.google.android.samples.graphics

GLSurfaceViewActivity

public class GLSurfaceViewActivity extends android.app.Activity

Fields Summary
private GLSurfaceView
mGLSurfaceView
Constructors Summary
Methods Summary
protected booleanisFullscreenOpaque()

        // Our main window is set to translucent, but we know that we will
        // fill it with opaque data. Tell the system that so it can perform
        // some important optimizations.
        return true;
    
protected voidonCreate(android.os.Bundle icicle)

        super.onCreate(icicle);
        
        // Make sure to create a TRANSLUCENT window. This is recquired
        // for SurfaceView to work. Eventually this'll be done by
        // the system automatically.
        getWindow().setFormat(PixelFormat.TRANSLUCENT);
    
        // We don't need a title either.
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        
        // Create our Preview view and set it as the content of our
        // Activity
        mGLSurfaceView = new GLSurfaceView(this);
        setContentView(mGLSurfaceView);
    
protected voidonPause()

        // Ideally a game should implement onResume() and onPause()
        // to take appropriate action when the activity looses focus
        super.onPause();
    
protected voidonResume()

        // Ideally a game should implement onResume() and onPause()
        // to take appropriate action when the activity looses focus
        super.onResume();