(Source code introduction
Slide in the list view to delete the item. I downloaded similar source code in the forum before, but I didn't see it after downloading. I suddenly wanted to realize sliding deletion by myself, so I wrote one myself. Their level is limited and their ideas are relatively simple, which is for reference only.
Idea: 1: inherit listview and rewrite ontouchevent (..) Method.
2: Get the sliding position and convert it to the position of the corresponding item in listview.
3: Delete the corresponding data in the corresponding list (stored data) in the adapter and update listview to complete the deletion.
Android listview sliding deletion (specific effect: 360 mobile guard background notification))