I have a RecyclerView whose Layout contains a RecyclerView. I want to synchronize the scroll positions of these nested RecyclerView(s). When synchronizing non-nested RecyclerViews, I created a RecyclerView.OnScrollListener & used the OnScrolled method, and then called the AddOnScrollListener method of the RecyclerView. However, because of the recycling feature of the RecyclerView, along with the fact that it has varying numbers of items, I am not sure how to do this for nested RecyclerView(s). What I basically need to do (or the best idea I could come up with) is set the scroll position for all the nested RecyclerView(s) from inside the OnScrolled method. However, because RecyclerView recycles the ViewHolder(s), this is not an option. Another option I thought of is to create an extra variable to hold the scroll position and then set it in OnBindViewHolder, but an extra variable seems inefficient. Any ideas?
