Code example for NumberPicker

Methods: getMaxValuegetMinValuegetValue

0
        } 
 
        // Create instance of custom BaseSavedState 
        final SavedState savedState = new SavedState(superState);
        // Set the state's value with the class member that holds current setting value 
        savedState.value = mNumberPicker.getValue();
        savedState.maxValue = mNumberPicker.getMaxValue();
        savedState.minValue = mNumberPicker.getMinValue();
        return savedState;
    } 
 
    @Override 
    protected void onRestoreInstanceState(Parcelable state) {
        // Check whether we saved the state in onSaveInstanceState 
        if (state == null || !state.getClass().equals(SavedState.class)) {
            // Didn't save the state, so call superclass 
            super.onRestoreInstanceState(state);
            return; 
        } 
 
        // Cast state to custom BaseSavedState and pass to superclass