1

I have a recycler view and each element has a cardView and a text on the side like this:

RecyclerView element

My goal is to be able swipe ONLY the cardView (yellow in the picture) in order to delete de element. I'm well aware that it's possible to swipe the entire element of the recycler view, but that is not what I'm looking for.

I would really appreciate if someone could tell me if this is possible and if so how can it be achived.

Thank you!

ahmad bajwa
  • 966
  • 2
  • 10
  • 30
  • If you're open to third party libraries, you can use [SwipeLayout](https://github.com/daimajia/AndroidSwipeLayout) and put the cardView in it. Otherwise, implement a TouchHelper, detect Swiping and translate `X` property of the CardView. – Lalit Fauzdar May 05 '21 at 16:37

0 Answers0