Code example for SeekBar

Methods: getProgress

0
 
        if (positiveResult) {
            // Store HW value in SharedPreferences object 
            SharedPreferences.Editor editor =
                    PreferenceManager.getDefaultSharedPreferences(getContext()).edit();
            editor.putInt(mHw.getPreferenceName(), mSeekBar.getProgress() + mMin);
            editor.commit();
        } else if (mOriginalValue >= mMin) {
            mHw.setValue(mOriginalValue);
        } 
    } 
 
    @Override 
    protected Parcelable onSaveInstanceState() {
        final Parcelable superState = super.onSaveInstanceState();
        if (getDialog() == null || !getDialog().isShowing()) {
            return superState;
        } 
 
        // Save the dialog state 
        final SavedState myState = new SavedState(superState);