Code example for Spinner

Methods: getItemAtPosition

0
		mode_spinner.setOnItemSelectedListener(new OnItemSelectedListener() {
 
			@Override 
			public void onItemSelected(AdapterView<?> arg0, View spinner,
					int position, long arg3) {
				Object o = mode_spinner.getItemAtPosition(position);
				if (o != null)
					setCameraMode(spinner.getContext(), (String) o);
 
			} 
 
			@Override 
			public void onNothingSelected(AdapterView<?> arg0) {
 
			} 
		}); 
 
	} 
 
	private String modeToString(int mode) {
		switch (mode) {