I have a list of items in list view, I want to display the item that user swipes left on, in a new fragment or activity as a textview. I want the entire list to animate and move a bit to left as if it has been pulled to left with the finger. I want to execute the same using custom views.
Question posted in Android Studio
The official documentation can be found here.
The official documentation can be found here.
2
Answers
You can either add Swipeable behavior to your
RecyclerView
like this :Add Swipeable Behavior
or use an external library to do that for you :
Use External Lib
I think the following post gives the most detailed equation for this behaviour. It relates the finger position to the bubble position and can be customised easily.
Here is the complete post
https://medium.com/@duolop/swipe-to-reply-animation-a-physics-based-approach-5ef646c396e4