// Be sure to call the super class.
super.onCreate(savedInstanceState);
// Get the resources for the context of the presentation.
// Notice that we are getting the resources from the context of the presentation.
Resources r = getContext().getResources();
// Inflate the layout.
setContentView(R.layout.presentation_content);
// Set up the surface view for visual interest.
mRenderer = new CubeRenderer(false);
mSurfaceView = (GLSurfaceView)findViewById(R.id.surface_view);
mSurfaceView.setRenderer(mRenderer);
// Add a button.
mExplodeButton = (Button)findViewById(R.id.explode_button);
mExplodeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mRenderer.explode();
}
});