Vertical ViewPager2 with RecyclerView Scrolling Issue

So...I was able to figure it out by just reading some documentation . I'll post the answer here so that it helps anyone else having a similar issue:

Since ViewPager2 does not supported nested scroll views very well, unlike NestedScrollView, we need to wrap our nested scrollview with a custom wrapper in our layout to be able to handle the touch and swipe events that are getting intercepted by our nested scroll views parent. In our case, the child would be the RecyclerView and the parent would be the ViewPager2.

You can find the wrapper class here. Simply add it to your project and then wrap your scrollable view in it, similar to below:

    <NestedScrollableHost
            android:layout_width="match_parent"
            android:layout_height="match_parent">

        <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/my_recycler_view"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical" />

    </NestedScrollableHost>

There are a couple things to note here: The documentation says that this solution will not work for scrollable views that are within other scrollable views within the ViewPager. This solution only works for immediate scroll views of the ViewPager.

Another note is that the wrapper class uses the requestDisallowInterceptTouchEvent() to make sure that the child scrollable view tells the parent not to scroll if the child needs to scroll instead.