How To Display Data Corresponding To An Item Selected In A Spinner
I'm new to android development using eclipse and I wonder if someone could me give some tips on how to do this little apps of mine. What I want to do is to display in text view the
Solution 1:
You can add a OnItemClickListener
to your Spinners and from there get the data for your TextView
On a Spinner call setOnItemClickListener() to a listener implemented by you.
In your implementation you will have a onItemClick(AdapterView<?> parent, View view, int position, long id)
method.
Inside this you can call getItem(position) on the Adapter to get the item selected and therefore get the data from there and put it in the TextView through setText()
Hope it helps, JQCorreia
Post a Comment for "How To Display Data Corresponding To An Item Selected In A Spinner"