I have a horizontal recycleview inside vertical recycleview.
and i add list cardview inside horizontal rec
Looking at your code the VerticalRecyclerViewAdapter has a List
and each Album in this list will require a HorizontalRecyclerViewAdapter to hold another List
.
In your VerticalRecylerViewAdapter create VerticalClickListener
which will be implemented by your activity. Inside HorizontalRecyclerViewAdapter create HorizontalClickListener
which will be implemented by your VerticalRecyclerViewAdapter for each Album. When creating the HorizontalRecyclerViewAdapter for each Album, pass in the vertical position as well. Then, when a cardview is clicked, the HorizontalClickListener
can return the vertical position of the adapter and also the horizontal position of the cardview. The VerticalRecyclerViewAdapter will return the vertical and horizontal positions to your activity.