Populate spinner

by tinyang » Fri, 14 Aug 2009 02:56:14 GMT


Sponsored Links
 Is the only way to populate a spinner to use an array, or can something like
the menu.add() be used?
 
-- 
:-) 

P Please don't print this e-mail unless you really need to. 
 
 
 
 

--~--~---------~--~----~------------~-------~--~----~



Populate spinner

by Jack Ha » Fri, 14 Aug 2009 03:31:46 GMT


 Can you be more specific on what you mean "menu.add()"?

--
Jack Ha
Open Source Development Center
obilestick together

The views, opinions and statements in this email are those of
the author solely in their individual capacity, and do not
necessarily represent those of T-Mobile USA, Inc.




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Populate spinner

by tinyang » Fri, 14 Aug 2009 03:49:55 GMT


 Here is a webpage with a menu.add() example:
 http://www.brighthub.com/mobile/google-android/articles/28673.aspx 

This example is what I am referring to with menu.add().

-----Original Message-----
From: android-beginners@googlegroups.com 
[mailto:android-beginn...@googlegroups.com] On Behalf Of Jack Ha
Sent: Thursday, August 13, 2009 2:32 PM
To: Android Beginners
Subject: [android-beginners] Re: Populate spinner


Can you be more specific on what you mean "menu.add()"?

--
Jack Ha
Open Source Development Center
obilestick together

The views, opinions and statements in this email are those of the author solely 
in their individual capacity, and do not necessarily represent those of 
T-Mobile USA, Inc.





No virus found in this incoming message.
Checked by AVG -  http://www.avg.com 
Version: 8.0.169 / Virus Database: 270.13.49/2293 - Release Date: 8/12/2009 
6:12 PM


--~--~---------~--~----~------------~-------~--~----~



Populate spinner

by Erik Babel » Sun, 13 Sep 2009 05:02:04 GMT


 After spending a lot of time trying to re-invent the ArrayAdapter, I
came across this:

ArrayAdapter adapter = new ArrayAdapter<CharSequence>(
                                          this,
                                         android.R.layout.simple_spinner_item,
                        new CharSequence[] {"asdf","eeee","rrrr"});





--~--~---------~--~----~------------~-------~--~----~



Populate spinner

by Jack Ha » Sun, 13 Sep 2009 05:52:44 GMT


 You need to use an adapter to provide the data for the spinner. You
will get an UnsupportedOperationException exception if you call
Spinner.addView().

--
Jack Ha
Open Source Development Center
T  Mobile stick together
The coverage you need at the price you want

The views, opinions and statements in this email are those of
the author solely in their individual capacity, and do not
necessarily represent those of T-Mobile USA, Inc.




--~--~---------~--~----~------------~-------~--~----~