Code example for Spinner

Methods: setOnItemSelectedListener

0
	private final Set<OnItemSelectedListener> listeners = new HashSet<AdapterView.OnItemSelectedListener>();
	private int possition = INITIAL;
 
	public SpinnerWrapper(Spinner spinner) {
		this.spinner = spinner;
		spinner.setOnItemSelectedListener(this);
	} 
 
	public void setAdapter(SpinnerAdapter adapter) {
		spinner.setAdapter(adapter);
		if (possition != INITIAL) {
			spinner.setSelection(possition);
		} 
	} 
 
	public void setOnItemSelectedListener(OnItemSelectedListener onItemSelectedListener) {
		listeners.add(onItemSelectedListener);
	} 
 
	public void setSelection(int i) {
Stop searching for code, let great code find you!  Add Codota to your java IDE