Code example for SeekBar

Methods: setProgress

0
        } 
 
        SavedState myState = (SavedState) state;
        super.onRestoreInstanceState(myState.getSuperState());
        mOriginalValue = myState.originalValue;
        mSeekBar.setProgress(myState.value);
    } 
 
    protected static void restore(Context context, HardwareInterface hw) {
        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
        int value = prefs.getInt(hw.getPreferenceName(), hw.getDefaultValue());
 
        hw.setValue(value);
    } 
 
    @Override 
    public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
        int warningThreshold = mHw.getWarningThreshold();
        boolean shouldWarn = warningThreshold > 0 && progress >= (warningThreshold - mMin);
 
        if (mProgressDrawable != null) {