Code example for NumberPicker

Methods: setValue

0
		// Cast state to custom BaseSavedState and pass to superclass 
		SavedState myState = (SavedState) state;
		super.onRestoreInstanceState(myState.getSuperState());
 
		// Set this Preference's widget to reflect the restored state 
		mNumberPicker.setValue(myState.value);
	} 
 
	private static class SavedState extends BaseSavedState {
		// Member that holds the setting's value 
		// Change this data type to match the type saved by your Preference 
		int value;
 
		public SavedState(Parcelable superState) {
			super(superState);
		} 
 
		public SavedState(Parcel source) {
			super(source);
			// Get the current preference's value 
			value = source.readInt(); // Change this to read the appropriate