I want to create a layout with multiple recyclerviews that are scroll-synced (already working) and on top of the whole LinearLayout which contains these recyclerviews I want to have another recyclerview (overlay) also scroll-synced with the others (already working).
Now my problem: The overlay should ignore all Touch/Click-Events like it is not there. The views inside the linearlayour should react to them (working without overlay).
I tried to get it to work with onIntercerptTouchEvent and dispatch TouchEvents to the other views but I don't have a guess how to get it working.
My Layout:
vertical_layout
contains multiple Recyclerviews
as mentioned
<ScrollView
android:id="@+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="false">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false">
<LinearLayout
android:id="@+id/vertical_layout"
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/channels_layout">
</LinearLayout>
<CustomOverlayRecyclerView
android:id="@+id/overlay_recycler_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="horizontal"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<LinearLayout
android:id="@+id/channels_layout"
android:layout_width="90dp"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintStart_toStartOf="parent">
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>