> 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 layout, which happens *after* your
call to pinner.setOnItemSelectedListener(this).

> So how do I make sure that my event handlers don't run during (re)
> initialization?

Your event handler doesn't run during initialization. It runs on the
first layout.

-- 
Romain Guy
www.curious-creature.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to