I have a list of object named
List<Products> data
Now I want to split this list by 10 items, so if I have 24 items in data list I want to create and fill 3 new List
sorry if this question is kinda confusing
EDIT
What I really what to do is to strip a long list of data into clusters, each cluster have 10 items. The reason I want to strip is I want to make a pagination instead of long list, each page have 10 items.
ListView lv;
List<Products> data
for (Products product : data) {
*I want to split the list here*
}
CustomAdapter adapter = new CustomAdapter(getContext(), data);
lv.setAdapter(adapter);