How would you go about to bind a JSONArray
to an adapter, the adapter will be used to bind data to a spinner.
Of course I could iterate over th开发者_如何学编程e strings in the JSONArray
and add 'em to a String array, but that seems cumbersome.
Create your own adapter class, extending BaseAdapter
, that adapts your JSON data according to whatever rules you feel are appropriate. The built-in adapter classes are not well-suited for JSON data.
精彩评论