Code example for SeekBar

Methods: getProgress

0
	protected void onDialogClosed(final boolean positiveResult) {
		super.onDialogClosed(positiveResult);
 
		// when the user selects "OK", persist the new value 
		if (positiveResult) {
			final int seekBarProgress = mSeekBar.getProgress() + mMinProgress;
			if (callChangeListener(seekBarProgress)) {
				setProgress(seekBarProgress);
			} 
		} 
	} 
 
	@Override 
	protected Object onGetDefaultValue(final TypedArray a, final int index) {
		return a.getInt(index, DEFAULT_PROGRESS);
	} 
 
	@Override 
	protected void onRestoreInstanceState(final Parcelable state) {
		// check whether we saved the state in onSaveInstanceState() 
		if (state == null || !state.getClass().equals(SavedState.class)) {