У меня есть CardView, который включает в себя RecyclerView внутри него.Я пытаюсь создать эффект ряби для всего CardView (или всего RecyclerView), когда пользователь нажимает на элемент RecyclerView, но эффект ряби применяется только к элементу.
<android.support.v7.widget.CardView
android:id="@+id/cardview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:foreground="?attr/selectableItemBackground">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/list"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="parent"/>
</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.CardView>