Take a look at the Spinner1 example in ApiDemos. -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick 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. On Jul 23, 7:01 am, Skeniver <[email protected]> wrote: > I suppose I would need to bind the Adapter to the Spinner, wouldn't > I... Just noticed that. So while that would help, it still doesn't > work... It is force closing... > > It runs through all the code shown, but my Eclipse debugging skills > aren't up to scratch yet, so I don't know really where it is going > wrong... Any help would be most appreciated. > > Thanks again! > > On Jul 23, 2:32 pm, Skeniver <[email protected]> wrote: > > > Hi there > > > I am a teach-yourself-Android beginner, and this is my first post... > > > I am trying to fill a spinner with a few strings. The layout on its > > own runs fine, and the code as I have it runs fine, but the spinner > > involved is not showing the data in the String array... Here is the > > code: > > > public void onCreate(Bundle savedInstanceState) { > > super.onCreate(savedInstanceState); > > setContentView(R.layout.main); > > > ArrayList<String> users = new ArrayList<String>(); > > ArrayAdapter<String> aa = new ArrayAdapter<String>(this, > > R.layout.main, R.id.SpinAccount, users); > > > users.add("Neil"); > > users.add("Amy"); > > > aa.notifyDataSetChanged(); > > > TextView balA = (TextView)findViewById(R.id.TextBalA); > > balA.setText("1.00"); > > } > > > Where have I gone wrong/what am I missing! > > > Thanks in advance! > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" 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-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

