I need to implement swipe to delete in a ListView
with Undo function as in Gmail App
I know that there are questions already asking about swipe to delete like
and
But none of them explains how to manage Undo after deletion and Animate back the deleted view on undo!
I found other one with no Answer here
How to implement gmail like Achieve or Undo action in a list item
So here is my question.
How to create a listview in android with swipe to delete then show UNDO in the deleted space and Animate back the same view if the undo is pressed, also remove the undo option on scroll or other item click or swipe?
You smart people have any idea?
| ----------- ITEM 1-----------|
| ----------- ITEM 2-----------|
| --Deleted-------<[UNDO]>|
| ----------- ITEM 4-----------|
| ----------- ITEM 5-----------|
note: sorry that I cant add an image because of my low reputation!
You can find exactly what you asked for at https://github.com/nhaarman/ListViewAnimations