Code example for SurfaceHolder

Methods: getSurface

0
     * @throws IOException  
     */ 
    public void setDisplay(SurfaceHolder sh) throws IOException {
        mSurfaceHolder = sh;
        if (sh != null) {
            mSurface = sh.getSurface();
        } else { 
            mSurface = null;
        } 
        _setVideoSurface(mSurface);
        //updateSurfaceScreenOn(); 
    } 
 
 
    /** 
     * Starts or resumes playback. If playback had previously been paused, 
     * playback will continue from where it was paused. If playback had 
     * been stopped, or never started before, playback will start at the 
     * beginning. 
     * 
     * @throws IllegalStateException if it is called in an invalid state