Android side slip-RecyclerV arranges the side slide menu built on three websites
ItemTouchHelpe arranges three websites to build [Journey Source Forum zhengtuwl.com] contact information: QQ:2747044651 is a help class provided by the Android system, you can easily use it to achieve long-press drag and side slide delete functions (here is to delete the whole Item directly after side sliding), let's take a look at how to use it.
ItemTouchHelper.Callback
The official explanation is that this class is a contract between ItemTouchHelper and your application. It allows you to control which touch behaviors are enabled for each ViewHolder and receives callbacks when the user performs these operations. Generally speaking, we can control the touch effect we want in this category, that is, sideslip or drag. Then you can get the callback during the execution of the action and the callback after the execution of the action.
We need to inherit ItemTouchHelper.Callback to implement our own logic. First of all, I would like to give a general introduction to the specific method of use, please check the information by yourself for details. Please look at the code:
/ * *
Implement your own logic Created by WANG on 18-3-14.
, /
Public class ItemTouchHelperCallback extends I [source code forum zhengtuwl.com] contact information: QQ:2747044651