There's a BottomSheetDialogFragment and working good vertically dragging states on fragment layout and opening STATE_EXPANDED mode. There's a recyclerview inside it and dragging vertically works on the bottom sheet but it doesn't work on recyclerview because of scrolling event. How the bottom sheet dragging event to work instead of scroll event on recyclerview when reached top of list and still scrolling up for collapse the bottom sheet?
BottomSheetDialogFragment hierarchy:
FragmentRootLinearLayout -> ...BottomLinearLayout... -> ViewPager2 -> RecyclerView
BottomSheetDialogFragment xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/BookInfoFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/tool_sheet_bg"
android:orientation="vertical"
app:layout_behavior="@string/bottom_sheet_behavior"
app:behavior_hideable="true"
android:clickable="true"
android:focusable="true">
<LinearLayout
android:id="@+id/tabs_linear_layout"
style="@style/ThemeSettingsRowContainer"
android:layout_width="match_parent"
android:layout_height="550dp"
android:layout_marginTop="15dp"
android:background="@drawable/xml_rounded_corner_bg2"
android:clickable="true"
android:focusable="true"
android:paddingTop="0dp"
android:paddingBottom="0dp">
<com.google.android.material.tabs.TabLayout
android:id="@+id/book_loading_tablayout"
android:layout_width="match_parent"
android:layout_height="50dp" />
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/book_loading_viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:focusable="true" />
</LinearLayout>
</LinearLayout>
Edit: The issue is on ViewPager2, when I change it to ViewPager dragging is working good on it. Same issue: BottomSheet + ViewPager2 drag to hide not works

