Best code examples for Android NumberPicker class (android.widget.NumberPicker)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android NumberPicker class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android NumberPicker examples from Open Source projects
This code example shows how to use the following methods: getMaxValue, getMinValue, setDisplayedValues, setMaxValue, setMinValue
449:	mMonthSpinner.setDisplayedValues(null); 
-
451:	mMonthSpinner.setMinValue(mCurrentDate.get(Calendar.MONTH)); 
452:	mMonthSpinner.setMaxValue(mCurrentDate.getActualMaximum(Calendar.MONTH)); 
-
454:	mMonthSpinner.setMinValue(mCurrentDate.getActualMinimum(Calendar.MONTH)); 
455:	mMonthSpinner.setMaxValue(mCurrentDate.get(Calendar.MONTH)); 
-
457:	mMonthSpinner.setMinValue(Calendar.JANUARY); 
458:	mMonthSpinner.setMaxValue(Calendar.DECEMBER); 
-
462:	mMonthSpinner.getMinValue(), mMonthSpinner.getMaxValue() + 1); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setDisplayedValues, setMaxValue, setMinValue, setValue, setWrapSelectorWheel
219:	mPositionInYearSpinner.setDisplayedValues(null); 
-
222:	mPositionInYearSpinner.setMinValue(getMinPositionInYear()); 
223:	mPositionInYearSpinner.setMaxValue(getMaxPositionInYear()); 
224:	mPositionInYearSpinner.setWrapSelectorWheel( 
-
234:	mPositionInYearSpinner.setValue(getPositionInYear()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: clearFocus, getValue
117:	mNumberPicker.clearFocus(); 
118:	mCallback.onNumberSet(mDialogId, mNumberPicker.getValue()); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getMaxValue, getMinValue, setDisplayedValues, setMaxValue, setMinValue
377:	mMonthSpinner.setDisplayedValues(null); 
378:	mMonthSpinner.setMinValue(0); 
379:	mMonthSpinner.setMaxValue(11); 
380:	mMonthSpinner.setWrapSelectorWheel(true); 
-
386:	mMonthSpinner.getMinValue(), mMonthSpinner.getMaxValue() + 1); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getMaxValue, getValue
153:	int newId = mUnitSpinner.getValue() * (mNumberSpinner.getMaxValue() + 1) 
154:	+ mNumberSpinner.getValue() + 1; 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setFocusable, setFocusableInTouchMode, setLayoutParams, setFormatter, setMaxValue
315:	NumberPicker digit = new NumberPicker(getContext()); 
-
323:	digit.setLayoutParams(params); 
324:	digit.setMinValue(0); 
325:	digit.setMaxValue(maxValue); 
-
327:	digit.setWrapSelectorWheel(false); 
328:	digit.setFocusable(false); 
329:	digit.setFocusableInTouchMode(false); 
-
332:	digit.setFormatter(new NumberPicker.Formatter() { 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setVisibility, setCurrent
422:	mYearPicker.setCurrent(mYear); 
423:	mYearPicker.setVisibility(mHasYear ? View.VISIBLE : View.GONE); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setFocusable, setFocusableInTouchMode, clearFocus, hasFocus, getValue
37:	} else if (addrEdit.hasFocus()) { 
38:	addrEdit.clearFocus(); 
-
47:	addrEdit.setEnabled(enabled); 
48:	addrEdit.setFocusable(enabled); 
49:	addrEdit.setFocusableInTouchMode(enabled); 
-
119:	light.setAddress(addrEdit.getValue()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getValue
100:	persistInt(mNumberPicker.getValue()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setDisplayedValues, setMaxValue, setMinValue, setValue, setWrapSelectorWheel
219:	mPositionInYearSpinner.setDisplayedValues(null); 
-
222:	mPositionInYearSpinner.setMinValue(getMinPositionInYear()); 
223:	mPositionInYearSpinner.setMaxValue(getMaxPositionInYear()); 
224:	mPositionInYearSpinner.setWrapSelectorWheel( 
-
234:	mPositionInYearSpinner.setValue(getPositionInYear()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setMaxValue, setMinValue, setOnValueChangedListener, setValue
31:	this.a.setMinValue(paramInt3); 
32:	this.a.setMaxValue(paramInt4); 
33:	this.a.setValue(paramInt2); 
34:	this.a.setOnValueChangedListener(this); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setFocusable, setFocusableInTouchMode, clearFocus, hasFocus, getValue
39:	} else if (addrEdit.hasFocus()) { 
40:	addrEdit.clearFocus(); 
-
49:	addrEdit.setFocusable(enabled); 
50:	addrEdit.setFocusableInTouchMode(enabled); 
51:	addrEdit.setEnabled(enabled); 
-
108:	light.setAddress(addrEdit.getValue()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setFocusable, setFocusableInTouchMode, clearFocus, hasFocus, getValue
41:	} else if (endAddrEdit.hasFocus()) { 
42:	endAddrEdit.clearFocus(); 
-
54:	endAddrEdit.setEnabled(enabled); 
55:	endAddrEdit.setFocusable(enabled); 
56:	endAddrEdit.setFocusableInTouchMode(enabled); 
-
130:	light.setEndAddress(endAddrEdit.getValue()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getValue
163:	persistString(mNumberPicker1.getValue() + "|" + mNumberPicker2.getValue()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setMaxValue, setMinValue, setOnValueChangedListener, setValue
44:	mNumberPicker = new NumberPicker(mCtx); 
-
51:	mNumberPicker.setOnValueChangedListener(this); 
-
55:	mNumberPicker.setMaxValue(mMax); 
56:	mNumberPicker.setMinValue(1); 
57:	mNumberPicker.setValue(mValue); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setEnabled, setMaxValue, setMinValue, setValue, setWrapSelectorWheel
179:	npSpeaker.setMaxValue(maxVolume); 
180:	npSpeaker.setMinValue(1); 
-
182:	npSpeaker.setWrapSelectorWheel(false); 
-
185:	npSpeaker.setValue(maxVolume/2); 
-
188:	npSpeaker.setEnabled(false); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setContentDescription, setMaxValue, setMinValue
33:	NumberPicker periodicity = new NumberPicker(this); 
34:	periodicity.setContentDescription("Defines the frequency that the location is send (in minutes)"); 
35:	periodicity.setMinValue(0); 
36:	periodicity.setMaxValue(60); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: clearFocus, getValue
86:	mNumberPickerView.clearFocus(); 
87:	mSnoozeMinutes = mNumberPickerView.getValue(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getMaxValue, getMinValue
68:	if (oldVal == picker.getMaxValue() && newVal == picker.getMinValue()) { 
-
71:	} else if (oldVal == picker.getMinValue() && newVal == picker.getMaxValue()) { 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setMaxValue, setMinValue, setValue
440:	mDayPicker.setMinValue(1); 
441:	mDayPicker.setMaxValue(max); 
442:	mDayPicker.setValue(mDay); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setValue
154:	mNumberPicker.setValue(myState.value); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setDescendantFocusability, setFormatter, setMaxValue, setMinValue, setValue
65:	mPicker = new NumberPicker(getContext()); 
-
67:	mPicker.setMaxValue(mMaxValue); 
68:	mPicker.setMinValue(mMinValue); 
69:	mPicker.setValue(mValue); 
-
71:	mPicker.setFormatter(new NumberPicker.Formatter() 
-
81:	mPicker.setWrapSelectorWheel(false); 
82:	mPicker.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setDisplayedValues, setMaxValue, setMinValue, setValue
370:	mKHzPicker.setMinValue(1); 
371:	mKHzPicker.setMaxValue(khzNumSteps); 
372:	mKHzPicker.setDisplayedValues(khzStrings); 
-
386:	mKHzPicker.setValue(mKhz); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getValue, setMaxValue, setMinValue, setOnValueChangedListener
79:	_numPlyrs.setMinValue(_util.MIN_PLAYERS); 
80:	_numPlyrs.setMaxValue(_util.MAX_PLAYERS); 
-
87:	_numPlyrsPlayoffs.setMaxValue(_numPlyrs.getValue()); 
-
97:	np.setOnValueChangedListener(new OnValueChangeListener() 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setDisplayedValues, setMaxValue, setMinValue, setValue
384:	mKHzPicker.setDisplayedValues(get50KHzStrings()); 
385:	mKHzPicker.setMinValue(1); 
386:	mKHzPicker.setMaxValue(khzNumSteps); 
387:	mKHzPicker.setDisplayedValues(khzStrings); 
-
402:	mKHzPicker.setValue(mKhz); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: clearFocus, getValue
105:	mNumberPicker.clearFocus(); 
106:	mCallback.onNumberSet(mNumberPicker.getValue()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMaxValue, setMinValue, setOnLongPressUpdateInterval
56:	picker.setMaxValue(255); 
57:	picker.setMinValue(0); 
58:	picker.setOnLongPressUpdateInterval(20); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setMaxValue, setMinValue, setValue
440:	mDayPicker.setMinValue(1); 
441:	mDayPicker.setMaxValue(max); 
442:	mDayPicker.setValue(mDay); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setVisibility, setValue
426:	mYearPicker.setValue(mYear); 
427:	mYearPicker.setVisibility(mHasYear ? View.VISIBLE : View.GONE); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getValue, setValue
90:	np2.setValue(today.minute); 
-
125:	if (Min + np2.getValue() >= 60) { 
126:	Min = Min + np2.getValue(); 
-
130:	Min = Min + np2.getValue(); 
-
139:	np2.setValue(0); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getMaxValue, getMinValue, getValue
126:	savedState.value = mNumberPicker.getValue(); 
127:	savedState.maxValue = mNumberPicker.getMaxValue(); 
128:	savedState.minValue = mNumberPicker.getMinValue(); 
Full Snippet Info
5
CodeRank
Related Android NumberPicker Questions & Answers:
See Code Examples for Android NumberPicker Methods: