Can I suggest that you separate the JSON parsing and the List View display 
into separate components of your code?  I'd recommend that you do a 
translation between JSON and your domain model (Java beans) and then use 
those objects to interact with your Array Adapter.  That way you can 
separate the implementation details of data sourcing and display into 
separate concerns.   This will also shield you from changes in the source 
JSON structure as well. 

If you go down this path, you can then write your own ArrayAdapter that 
works off your business objects.   e.g.  public class MyArrayAdapter extends 
ArrayAdapter<MyBusinessObject> ....
In this object, you can store a private member points to the list of 
business objects.  private List<MyBusinessObject> list;

Then its just a matter of pulling out the right object when the view is 
called and then mapping that to the fields that are in your list view. 

Hope that helps. 

-rishi

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to