Code example for NumberPicker

Methods: getMaxValuegetMinValuegetValue

        // 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;
    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 
Experience pair programming with AI  Get Codota for Java