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

