Create your account

Already have an account? Login here

Note: By joining, you will receive periodic emails from Coursetro. You can unsubscribe from these emails.

Create account

75. Introduction To RecyclerView ItemTouchHelper

Design + Code an Android App from Scratch

Woah, wait a second..

Scrounge up some loose change to become a pro member, or login to your account to view this lesson.

Alright, join now. Or login to your account if you're already a pro member.

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