Code example for SeekBar

Methods: getProgress

0
    @Override 
    protected void onDialogClosed(boolean positiveResult) {
        super.onDialogClosed(positiveResult);
 
        if (positiveResult) {
            onProgressChanged(mSeekBar, mSeekBar.getProgress(), true);
        } else { 
            restoreOldState(); 
        } 
    } 
 
    private void restoreOldState() { 
        if (mRestoredOldState) {
            return; 
        } 
 
        Settings.System.putFloat(getContext().getContentResolver(),
                Settings.System.PIE_SIZE, mOldSize);
 
        mRestoredOldState = true;
    }