Re: [android-developers] get adapter from OnItemSelectedListener?
At 07:06 AM 2/20/2012, you wrote:
>On Sun, Feb 19, 2012 at 11:28 PM, Ray Tayek
><<mailto:rtayek@ca.rr.com>rtayek@ca.rr.com> wrote:
>can one discover the array adapter for the spinner from the
>OnItemSelectedListener class? ...
>
><http://developer.android.com/reference/android/widget/AdapterView.OnItemSelectedListener.html#onItemSelected(android.widget.AdapterView<?>,
>android.view.View, int,
>long)>http://developer.android.com/reference/android/widget/AdapterView.OnItemSelectedListener.html#onItemSelected(android.widget.AdapterView<?>,
>android.view.View, int, long)
>
>See the first parameter? If you follow that:
>
><http://developer.android.com/reference/android/widget/AdapterView.html#getAdapter()>http://developer.android.com/reference/android/widget/AdapterView.html#getAdapter()
>
yes, SpinnerAdapter
spinnerAdapter=(SpinnerAdapter)parent.getAdapter(); works like a charm!
thanks
---
co-chair http://ocjug.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
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home