Create your account

Already have an account? Login here

Create account

75. Introduction To RecyclerView ItemTouchHelper

Design + Code an Android App from Scratch

Woah, wait a second..

Scrounge up some loose change to buy this course, or login to your account to view this lesson.

Alright, buy it for $25 Or login to your account if you purchased already.

This video introduces you to the RecyclerView.ItemTouchHelper class that lets you detect swipe and drag. Implement the ItemTouchHelper.Callback interface and override the onMove or onSwipe method to determine the actions that need to be executed when the item is dragged from one position to another within the RecyclerView or it is swiped. An alternate approach is to use the ItemTouchHelper.SimpleCallback where you can minimally define the behaviours that you want to support inside the RecyclerView. Use the makeMovementFlags method to specify the direction of drag or swipe. Override the isLongPressDragEnabled and return true to support dragging and override the isItemViewSwipeEnabled to support swiping.

Course Cirriculum