I am trying to implement a horizontal recyclerview
and each item of the recyclerview
will be a vertical recyclerview
with a grid layou
I used card view for cells and deactivated parent recycler view scrolling in child adapter with child cell itemView setOnClickListener
.
holder.itemView.setOnTouchListener { view, _ ->
view.parent.parent.requestDisallowInterceptTouchEvent(true)
false
}
we are calling view.parent.parent
because of the fact that itemView
is a cell layout and it's parent is our child recyclerView
and also, we need to reach child recyclerView's parent to prevent parent recyclerView
scrolling.