I have a web service that returns a super simple list of objects
MyObject[] data = webServiceCall();
MyObject has 1 field i want to display, "Name" (i.e. data[0].Name )
How can i turn this into an activity that lists just the name of these objects in a scrollable listActivity on Android. I am getting really confused with Cursors and am not sure if I need Cursors and I”m not sure what kind of adapter to implement (BaseAdapter, SimpleAdapter etc)
So i guess i’m looking for three things,
the activity, the adapter and the layout.xml
Just trying to figure this android stuff out, definitely a noob here
so i think i figured it out with a little inspiration from RobGThai’s answer, i’m posting the code for anyone else to see, i guess i didn’t really use a custom adapter
This is the super simple example that got me started, so once i had this, I made sure my “MyObject” had a toString() method on it to show properly in the list and i passed the MyObject[] array into the “new ArrayAdapter” constructor instead of listItems
FooList.java
the layout xml i used (temp.xml)