Create your account

Already have an account? Login here

Create account

86. Disable Swipe For Footer

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 shows how to disable swipe to delete for special items such as the Footer and the No Items View. Inside the onSwipe method of our ItemTouchHelper.Callback subclass we check if the type of the ViewHolder is a regular item and propagate the swipe event only if its a regular item In the next step, we override the onChildDraw and onChildDrawOver to trigger their default behaviour which basically moves the item while it is being swiped only if its a regular item.

Course Cirriculum