Code example for Spinner

Methods: setAdaptersetPrompt, setOnItemSelectedListener

0
	} 
	 
	private void loadFilters () { 
		 
		ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, filters);
		filterSelector.setPrompt("Seleccione un filtro");
		filterSelector.setAdapter(adapter);
		 
		filterSelector.setOnItemSelectedListener(new OnItemSelectedListener() {
 
			@Override 
			public void onItemSelected(AdapterView<?> arg0, View arg1,
					int position, long id) {
				filters[0] = "A-Z";
				 
				switch(position) {
				case 0: 
					updateList("name", false); 
					break; 
				case 1: 
					updateList("category", false);