I want to set the android spinner item values at runtime.
Here is what I have so far:
final ArrayAdapter<String> calsListAdapter = new ArrayAdapter<String>( this,
android.R.layout.simple_list_item_1, calendarNames);
eventCalendarList.setAdapter(calsListAdapter);
eventCalendarList.setOnItemSelectedListener(new OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
calendarChoosen = availableCals.get(arg2);
}
public void onNothingSelected(AdapterView<?> arg0) {
Logger.d("Cal Choosen", "fffffffffffffff");
}
});
private List<AvailableCalendar> availableCals = new ArrayList<AvailableCalendar>();
private AvailableCalendar calendarChoosen;
But the values are not set. How can it be done?