Code example for VideoView

Methods: canPausecanSeekForward, canSeekBackward

0
        if (mPlayer == null) {
            return; 
        } 
         
        try { 
            if (mPauseButton != null && !mPlayer.canPause()) {
                mPauseButton.setEnabled(false);
            } 
            if (mRewButton != null && !mPlayer.canSeekBackward()) {
                mRewButton.setEnabled(false);
            } 
            if (mFfwdButton != null && !mPlayer.canSeekForward()) {
                mFfwdButton.setEnabled(false);
            } 
        } catch (IncompatibleClassChangeError ex) {
            // We were given an old version of the interface, that doesn't have 
            // the canPause/canSeekXYZ methods. This is OK, it just means we 
            // assume the media can be paused and seeked, and so we don't disable 
            // the buttons. 
        } 
Stop searching for code, let great code find you!  Add Codota to your java IDE