Code example for NumberPicker

Methods: getMaxValuegetValue

0
    public void reloadPreference() { 
    } 
 
    private void updateInputState() { 
        if (mTimeLapseSwitch.isChecked()) {
            int newId = mUnitSpinner.getValue() * (mNumberSpinner.getMaxValue() + 1)
                    + mNumberSpinner.getValue() + 1;
            mPreference.setValueIndex(newId);
        } else { 
            mPreference.setValueIndex(0);
        } 
 
        if (mListener != null) {
            mListener.onListPrefChanged(mPreference);
        } 
    } 
}