Code example for NumberPicker

Methods: getMaxValuegetMinValue

0
        mSecondSpinner.setOnLongPressUpdateInterval(100);
        mSecondSpinner.setFormatter(timeFormatter);
        mSecondSpinner.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {
            public void onValueChange(NumberPicker spinner, int oldVal, int newVal) {
//                updateInputState(); 
                int minValue = mSecondSpinner.getMinValue();
                int maxValue = mSecondSpinner.getMaxValue();
                if (oldVal == maxValue && newVal == minValue) {
                    int newHour = mMinuteSpinner.getValue() + 1;
                    mMinuteSpinner.setValue(newHour);
                } else if (oldVal == minValue && newVal == maxValue) {
                    int newHour = mMinuteSpinner.getValue() - 1;
                    mMinuteSpinner.setValue(newHour);
                } 
                onTimeChanged(); 
            } 
        }); 
//        mSecondSpinnerInput = (EditText) mSecondSpinner.findViewById(R.id.numberpicker_input); 
//        mSecondSpinnerInput.setImeOptions(EditorInfo.IME_ACTION_NEXT); 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE