[android-developers] How to get value from string array?

2012-05-21 Thread Tommy Wong
I use a spinner that the choice of spinner comes from array A - I
have did it
while array B has corresponding value of A

I hope to get the value from B when I use the spinner, how can I do
so?
I don't know how to relate two arrays :(
Thanks

-- 
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


Re: [android-developers] How to get value from string array?

2012-05-21 Thread Justin Anderson
Make sure the two arrays have the same length...  Get the position of the
selected item from the spinner (which would be displaying Array A) and then
access the correct position in Array B.

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Wed, May 16, 2012 at 9:55 AM, Tommy Wong tommywongch1...@gmail.comwrote:

 I use a spinner that the choice of spinner comes from array A - I
 have did it
 while array B has corresponding value of A

 I hope to get the value from B when I use the spinner, how can I do
 so?
 I don't know how to relate two arrays :(
 Thanks

 --
 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

-- 
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