I am working on a project where I have to parse two different api's
and populate them into a single ListView
. I have created two setter-getter classes to hold the parsed data.
- CategoryDetails
- VideoItem
Both classes has different different variables. Now here what I am trying to merge them.
private ArrayList<CategoryDetails> categoryDetailsArrayList = new ArrayList<>();
private ArrayList<VideoItem> mVideoItems = new ArrayList<>();
/**
* API parsing and other coding stuff
**/
categoryDetailsArrayList.addAll(mVideoItems);
adapter = new Adapter(this, categoryDetailsArrayList)
When I am trying to merge them, I am getting the error:
addall(java.util.collection extends java.lang.string) in arraylist cannot be applied to (java.util.arrayList)