Code example for SurfaceHolder

Methods: addCallbacksetType

0
     * @param attrs 
     */ 
    public CameraPreviewView(Context context, AttributeSet attrs) {
        super(context, attrs);
        mHolder = getHolder();
        mHolder.addCallback(this);
        mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
        // TODO Auto-generated constructor stub 
    } 
 
    /* (non-Javadoc) 
     * @see android.view.SurfaceHolder.Callback#surfaceChanged(android.view.SurfaceHolder, int, int, int) 
     */ 
    @Override 
    public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
        // TODO Auto-generated method stub 
         
    } 
 
    /* (non-Javadoc) 
Stop searching for code, let great code find you!  Add Codota to your java IDE