0

I am looking for solution that solves a problem of a dynamic list that in turn contains a dynamic list of rows.

I have a recycler view which holds a card view that eventually holds another recyclerview. I can see that the parent recycler view is showing up but the child recycler is not showing up. {{recyclerView{cardView{recyclerView}}} The getItemCount method is being called but all the other methods such as onCreateViewHolder and bind are not being called.

I have made sure both the recycler views have the linearlayoutmanager implemented and have setFixedSize as true.

i_raqz
  • 2,919
  • 10
  • 51
  • 87
  • May be its not possible. Similar issue here: http://stackoverflow.com/questions/37423763/recycler-view-inside-recycler-view-not-scrolling – Saeed Sharman Jun 18 '16 at 16:01
  • People say its possible . Here : http://stackoverflow.com/questions/32134290/recycler-view-inside-another-parent-recycler-view – Saeed Sharman Jun 18 '16 at 16:03

2 Answers2

0

I believe it is the issue with your xml layout. Maybe it is not coming in focus hence it is not calling those overridden methods,as recylerview becomes unavailable.Make sure that the padding,height and rest other things are such that the child recyclerview is visible.Actually when I implemented it, I faced the same issue and the reason was my xml layout with the same reason as my second recyler was not visible due to overpadding and margin.

Pritish
  • 1,284
  • 1
  • 19
  • 42
0

Found the problem. Had to upgrade to a newer version of recycler view. And added wrap content. It started working.

i_raqz
  • 2,919
  • 10
  • 51
  • 87