Methods Summary |
---|
protected boolean | isFullscreenOpaque()
// 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 void | onCreate(android.os.Bundle icicle)
super.onCreate(icicle);
// Hide the window title.
requestWindowFeature(Window.FEATURE_NO_TITLE);
// 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);
// Create our Preview view and set it as the content of our
// Activity
mPreview = new Preview(this);
setContentView(mPreview);
|
protected void | onPause()
// Start Preview again when we resume.
super.onPause();
mPreview.pause();
|
protected void | onResume()
// Because the CameraDevice object is not a shared resource,
// it's very important to release it when the activity is paused.
super.onResume();
mPreview.resume();
|