I have created an activity with bottom sheet behavior. I am sharing the layout XML here
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/video_details_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/backgroundColor"
app:behavior_hideable="true"
app:behavior_peekHeight="@dimen/player_sheet_peek_height"
app:layout_behavior="@string/bottom_sheet_behavior">
<LinearLayout
android:id="@+id/detailsLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@+id/mainMediaFrame"
android:layout_width="match_parent"
android:layout_height="@dimen/zero_dimen"
android:layout_weight="0.35"
android:background="@android:color/black">
<com.google.android.exoplayer2.ui.SimpleExoPlayerView
android:id="@+id/exoPlayerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
app:resize_mode="fit"
app:surface_type="texture_view" />
</FrameLayout>
<android.support.v4.widget.NestedScrollView
android:id="@+id/videoScroller"
style="@style/scrollBarStyle"
android:layout_height="@dimen/zero_dimen"
android:layout_weight="0.65"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<!--todo:include scroll view content layout-->
</android.support.v4.widget.NestedScrollView>
</LinearLayout>
</RelativeLayout>
After the implementation, I can collapse the bottom sheet by touch and drag any of the views in this layout. But, I want to close the sheet by dragging video view (mainMediaFrame) in the layout. That is, I don't want to dismiss the bottom sheet by scrolling down the nested scroll view. How can I achieve this?