0

I wonder if it's possible to add items to list view from deferent json arrays, I could do it with one json array using custom list view adapter and ListView1 , What i need exactly is to add 1st item from the second json array after the item 4 from listView1.

note: I followed this to build my first list view of the first json array.

  • 1
    pass both arrays to adapter and in getView method of adapter check for position – Marko Niciforovic Nov 11 '14 at 14:43
  • 1
    Will the views for each item be the same even if from different json? If not, you may want to look into a BaseAdapter implementation with getViewTypeCount() and getItemViewType() that will let you distinguish different items in your list based on their position. – zgc7009 Nov 11 '14 at 14:47
  • @zgc7009 no actually the second json array view is deferent it's just and image while the first json array contains image and text, so what you meant is it's possible to organize the get view for two deferent json array ? – Abdulrahman S. Alkateb Nov 11 '14 at 15:24
  • Sure can. You can have two different lists in your BaseAdapter and use the methods I mentioned to determine what type you should show in your list. – zgc7009 Nov 11 '14 at 15:25

0 Answers0