Search code examples
androidviewdrag-and-dropuiswitchswipe-gesture

How to Drag a view to top and bottom like this in Android?


I want to perform an action when user turned off or on by dragging the view and I don't want it to stop in middle.

enter image description here

Any Idea how to achieve this?


Solution

  • to perform dragging, you have to use motion layout for it, Click here for more reference.