NumberPicker getMaxValue - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for NumberPicker getMaxValue method.

This code example shows how to use the following methods:getMaxValue, getMinValue, setDisplayedValues, setMaxValue, setMinValue
8
CodeRank
This code example shows how to use the following methods:getMaxValue, getMinValue, setDisplayedValues, setMaxValue, setMinValue
This code example shows how to use the following methods:getMaxValue, getValue
    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);
        } 
    } 
} 
6
CodeRank
This code example shows how to use the following methods:getMaxValue, getMinValue
                int year = getYear();
                int positionInYear = getPositionInYear();
                // take care of wrapping of days and months to update greater fields 
                if (picker == mPositionInYearSpinner) {
                    positionInYear = newVal;
                    if (oldVal == picker.getMaxValue() && newVal == picker.getMinValue()) {
                        year += 1;
                        positionInYear = getMinPositionInYear(year);
                    } else if (oldVal == picker.getMinValue() && newVal == picker.getMaxValue()) {
                        year -=1;
                        positionInYear = getMaxPositionInYear(year);
                    } 
                } else if (picker == mYearSpinner) {
                    year = newVal;
                 } else { 
                    throw new IllegalArgumentException();
                } 
 
                // now set the date to the adjusted one 
                setCurrentDate(year, positionInYear);
6
CodeRank
This code example shows how to use the following methods:getMaxValue, getMinValue, getValue
        } 
 
        // 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; 
        } 
 
5
CodeRank
This code example shows how to use the following methods:getMaxValue, getMinValue, setDisplayedValues, setMaxValue, setMinValue
5
CodeRank
This code example shows how to use the following methods:getMaxValue, getMinValue, setDisplayedValues, setMaxValue, setMinValue
5
CodeRank
This code example shows how to use the following methods:getMaxValue, getValue
    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);
        } 
    } 
} 
4
CodeRank
This code example shows how to use the following methods:getMaxValue, getValue
    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);
        } 
    } 
} 
4
CodeRank
getMaxValue Method Overview
Returns the max value of the picker.
See Code Examples for other Android NumberPicker Methods: