Sign in Go Pro


Drag & Drop and Swipe to Dismiss using ItemTouchHelper

This lesson is for PRO members.

Upgrade today to get access to all the PRO lessons.

Unlock this lesson

Up next



This lesson will show how to add gesture-based controls to your RecyclerView using ItemTouchHelper. It is a utility class designed to make it easy to add swipe to dismiss and drag & drop support to RecyclerView. #### Lesson Objectives * Define the ItemTouchHelper class * Show how the ItemTouchHelper.Callback class is used to * Control which gestures are enabled * Receive callbacks based on user events * Implement Swipe to Dismiss (swipe a list Item to remove it) * Implement Drag & Drop (drag items in a list to re-arrange the order) #### Gist with classes to copy into project [Gist: Interfaces and ItemTouchHelper.Callback]( #### External Resources Check this excellent [blog post](, by [Paul Burke]( for details about the implementation shown in this lesson. #### Android References [ItemTouchHelper]( [ItemTouchHelper.Callback](

Lessons in RecyclerView