Package 

Class EpoxyTouchHelper


  • 
    public abstract class EpoxyTouchHelper
    
                        

    A simple way to set up drag or swipe interactions with Epoxy.

    Drag events work with the EpoxyController and automatically update the controller and RecyclerView when an item is moved. You just need to implement a callback to update your data to reflect the change.

    Both swipe and drag events implement a small lifecycle to help you style the views as they are moved. You can register callbacks for the lifecycle events you care about.

    If you want to set up multiple drag and swipe rules for the same RecyclerView, you can use this class multiple times to specify different targets or swipe and drag directions and callbacks.

    If you want more control over configuration and handling, you can opt to not use this class and instead you can implement EpoxyModelTouchCallback directly with your own . That class provides an interface that makes it easier to work with Epoxy models and simplifies touch callbacks.

    If you want even more control you can implement EpoxyTouchHelperCallback. This is just a light layer over the normal RecyclerView touch callbacks, but it converts all view holders to Epoxy view holders to remove some boilerplate for you.