Code example for NumberPicker

Methods: setOnValueChangedListener

0
	// Function that is called when the number of 
	// players in the prelims changes. This function 
	// updates the new max players for the playoffs. 
	private void setOnValueChangeListener(NumberPicker np)
	{ 
		np.setOnValueChangedListener(new OnValueChangeListener()
		{ 
			public void onValueChange(NumberPicker picker, int oldVal, int newVal)
			{ 
				_numPlyrsPlayoffs.setMaxValue(newVal);
			} 
		}); 
	} 
	 
	// Function to load the ListViews with the possible 
	// draft and playoff types. 
	private void setPossibleDraftTypes() 
	{ 
		_draftTypesList.setAdapter(new CustomExpandableListAdapter
		(this, _util.DRAFT_TYPES, _util.DRAFT_SUBTYPES_ELIM, _util.DRAFT_SUBTYPES_RR));