0

I am new to android I want to implement one feature called left swipe on a single text view or one card, not on recycler view and list view.

Left swipe should show remove option. Here is the final output how can I achieve this?

enter image description here

Any link would be helpful.

Sunny
  • 68
  • 8
  • You can achieve such by using `MotionLayout`. See the [official docs](https://developer.android.com/training/constraint-layout/motionlayout) and [official examples](https://developer.android.com/training/constraint-layout/motionlayout/examples). Also, you can read [this series of articles](https://medium.com/google-developers/introduction-to-motionlayout-part-i-29208674b10d) on MotionLayout to know more. You can also use [`TouchListener`](https://stackoverflow.com/a/12938787/8244632) to achieve such an example but `MotionLayout` can give your more control to the `Layout` part. – Lalit Fauzdar Jun 11 '20 at 07:54
  • You can also read [this article](https://medium.com/@droidbyme/android-recyclerview-with-swipe-layout-ec62caedf694#:~:text=One%20is%20swipe%20layout%20and,Its%20very%20important.) to implement what you want, just pass a single view instead of a series of views as in `Holder` of `RecyclerView`. – Lalit Fauzdar Jun 11 '20 at 07:56
  • https://github.com/daimajia/AndroidSwipeLayout – Javad Dehban Jun 11 '20 at 08:44

0 Answers0