You have a few options. You can ask the view for the position of the
selected item (getSelectedItemPosition()), or the ID you associated
with that item (getSelectedItemId()), or register listener with
setOnItemSelectedListener().

You can get the associated item with getSelectedItem(). You can get
the associated View with getSelectedView(), and you can extract
relevant state from that. You can also register listeners on items
within the view, if they will be changing state as the result of your
interactions with them.

Use whatever is simplest for your application.

On Apr 16, 3:15 am, matio <[email protected]> wrote:
> Hi everyone, I'm trying to expand a todo list program taken from a
> tutorial in a magazine. The problem I'm having is getting the value
> from a spinner that is selecting the priority of the item, how do I do
> it? I think it is something to do with views but how do I get the
> string?
>
> Thanks in advance...
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
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