[android-developers] Re: Avoiding onItemSelected calls during initialization

2009-01-06 Thread daekpony
I understand that the onItemSelected callback is run on the first layout, but it doesn't quite make sense to me why. I'd like the spinner to act as a simple drop down selection list that allows the user to select a single item. The only selection completed hook I found is the onItemSelected

[android-developers] Re: Avoiding onItemSelected calls during initialization

2008-11-22 Thread Romain Guy
void init() { spinner.setOnItemSelectedListener(null); spinner.setAdapter(prioritiesAdapter); spinner.setSelection(task.getPriority() - 1); spinner.setOnItemSelectedListener(this); } setAdapter() is not a blocking call. The items and the selection are set in the spinner on the first