There is a RecyclerView , in which elements are CardView with elements. I tied the selector to CardView , but when I clicked, the background color does not change. Does CardView selector not work? Made it in /color seems all right

    2 answers 2

    Need to use setOnTouchListener

    • Unfortunately the cant with scrolling - Nick ELF-M

    If you don’t need a specific color, but a standard Ripple effect, you can use android:foreground="?selectableItemBackgroundBorderless" in xml for CardView android:foreground="?selectableItemBackgroundBorderless"