How can I convert this type of Arraylist to Two Dimensional Arraylist ?
ArrayList<ArrayList<String>> two = new ArrayList<ArrayList<String>>();
In android ExpandableListView does not allow to use Arraylist to populate the listview. But I have to dynamically populate the data from JSON web service. How Can I solve this issue ?
Any help would be great !
If you’re coming from a JSON object, then the data is already in the format that you want. It’s already an array of arrays. You can just loop through the first array assigning the second as you go.
I didn’t test this, so the syntax might not be 100% but you get the idea.