de.monarchy.guideme.view
Class CameraSurface

java.lang.Object
  extended by SurfaceView
      extended by de.monarchy.guideme.view.CameraSurface

public class CameraSurface
extends SurfaceView

CameraSurface is a SurfaceView able to hold the camera preview. It is mainly based on a former Android Developer guide article.

Author:
dstuerze

Method Summary
static CameraSurface getInstance(Context x)
          Returns an instance of the CameraSurface.
 void surfaceChanged(SurfaceHolder holder, int format, int w, int h)
           
 void surfaceCreated(SurfaceHolder holder)
           
 void surfaceDestroyed(SurfaceHolder holder)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

surfaceCreated

public void surfaceCreated(SurfaceHolder holder)

surfaceDestroyed

public void surfaceDestroyed(SurfaceHolder holder)

surfaceChanged

public void surfaceChanged(SurfaceHolder holder,
                           int format,
                           int w,
                           int h)

getInstance

public static CameraSurface getInstance(Context x)
Returns an instance of the CameraSurface. CameraSurface is a singleton, so it only creates one instance.

Parameters:
x - application context
Returns:
the one and only instance