My xml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
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/scheduled_scroller"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/calendarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/user_list_recycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</RelativeLayout>
</ScrollView>
My requirement is that I want the recycler view and scroll view to scroll independently which they do but when I make vertical gestures on the Linear layout the scroll view must not scroll. I'm not able to detect the vertical gestures, It simply scrolls the scroll view.
On detecting the vertical fling up/down, I want to use it to perform some other operation like colour change on the layout.
The gestures must work only when the touch is within the bounds of the linear layout and nowhere else