I have 3 RecyclerViews.
Z item belongs to Y. Y belongs to X.
Let's say there are A and B.
A Item layout looks like that.
<LinearLayout
android:id="@+id/ll_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:clickable="true"
style="@style/SelectableItemBackground"
android:weightSum="3"
android:focusable="true">
<TextView
android:id="@+id/tv1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="1"
android:textAllCaps="true"
android:textColor="@android:color/black" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rcv_b_list"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:clickable="true"
android:focusable="true"
android:paddingBottom="5dp"
android:textAllCaps="true"
android:textColor="@android:color/black"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_label" />
</LinearLayout>
B Item layout looks like this.
<LinearLayout
android:id="@+id/ll_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:clickable="true"
style="@style/SelectableItemBackground"
android:weightSum="3"
android:focusable="true">
<TextView
android:id="@+id/tv1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="1"
android:textAllCaps="true"
android:textColor="@android:color/black" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rcv_c_list"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:clickable="true"
android:focusable="true"
android:paddingBottom="5dp"
android:textAllCaps="true"
android:textColor="@android:color/black"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_label" />
</LinearLayout>
When I touch A Item, It has ripple effect. However, B Items doesn't get the effect. So, only non-B Items area has the ripple effect. When I touch B items area, only one B item has the ripple effect.
I'd like to implement ripple effect as one which follows the parent view behaviour(A List). When I touch any part of A item, I hope it gets ripple effect include all the child views. Also, vice-versa, When I touch any items of B list, while that A Item have the ripple effect and also, it clicks only A item. Not B item.
Now, I have 3 RecyclerViews. X, Y, Z. And I'd like to touch each Y item. And Z is not clickable.
How can I implement this feature?