3

I have four type of different data with different view type like the below image enter image description here . but that is not a problem problem is the data will came from different api. My question is how to combine them in a single adapter because i need to use lazy loading .so I cant load whole data at a time so i need to call the different type of api like : goallist api , aprisaList api , post Api etc. When user scroll. any one can give me a idea with example . How can i handle that ? Also when user will scroll it will call another api likeCount and comment count also.

  • When user reaches the end of the list, will you be calling all the four data source apis ? Also how do you do ordering of data ; as in how do you decide which data will be shown after which data ? One last question, let's suppose you don't need lazy loading, how are you representing the data in the recyclerview ? Is it one single model or different models for each api ? – May Rest in Peace Dec 11 '18 at 18:24
  • I will order the data based on timestamp. actually i need to call the api when user scroll five item from recycle view or 10 items. https://stackoverflow.com/questions/25914003/recyclerview-and-handling-different-type-of-row-inflation refer to this link i can show multiple view type data – Abaneel Jahid Dec 11 '18 at 18:28

0 Answers0