I have a LinearLayout, lets call it LL; in my code I dynamically
create spinners and and/remove them from LL; every Spinner has a
AdapterView.OnItemSelectedListener with the Method onItemSelected;
when you add a Spinner dynamically then the Method "onItemSelected" is
called automatically; this behavior is not programmed by me, it's
automatically invoked 1 time; when the view is restored from a State
before, it seems to get invoked 2 times before the user has done
anything;

inside the Method "onItemSelected" I have to take care if the
selection comes from the User or if it comes from initialization (or
adding) the spinner on the screen; now I played a little bit with the
method

LinearLayout.addView(mySpinner)

# My Idea was the following:

boolean ignoreNextSelections = true;
LinearLayout.addView(mySpinner)
ignoreNextSelections = false;

The boolean Variable ignoreNextSelections I could check inside the
Method onItemSelected. But this idea doesn't work because the Method
LinearLayout.addView(View child) seems to be nonblocking, it seems to
be a Thread or something similar in the background.

So now my question:
Is there a Method to determine if a spinner is fully added to the
screen (or to a view)?
Or in other words:
Is there a Method to determine if the layout-process of a View is
fully finished?
Thanks for Help
Anil



-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to