4

I'm developing a app which requires to have a recyclerview with multiple view type for which I'm using following approach https://stackoverflow.com/a/26245463/6350239 , but for my requirement i need to have recyclerview in one of the row of a parent recyclerview, though I have achieved required layout:

  • My onbindViewholder for child recyclerview is called at once only for all the items, & lastvisibleItemposition is always the last item though its not literally visible on screen.
  • I doubt that child recyclerview is not recycling its items.

How do I check if My child recyclerView is Recycling?? also is it right to have recyclerview as a rowitem in another recyclerview ??

Moulesh
  • 2,762
  • 1
  • 22
  • 32

1 Answers1

0

How do I check if My child recyclerView is Recycling??

Well, the most basic test and probably the most efficient is to check wether the data/behaviour from each item in your child RecyclerView corresponds to the expected.

Also is it right to have recyclerview as a rowitem in another recyclerview ??

I don't see why it shouldn't be right. To be honest, quite the opposite, you should at all time use libraries that will save you memory, which is why RecyclerView is great for listing. Obviously the solution may get a bit trickier than a regular and single RV, but it is doable.

Ricardo
  • 9,136
  • 3
  • 29
  • 35