Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

SimpleOnItemTouchListener

open class SimpleOnItemTouchListener : RecyclerView.OnItemTouchListener
kotlin.Any
   ↳ androidx.recyclerview.widget.RecyclerView.SimpleOnItemTouchListener

An implementation of RecyclerView.OnItemTouchListener that has empty method bodies and default return values.

You may prefer to extend this class if you don't need to override all methods. Another benefit of using this class is future compatibility. As the interface may change, we'll always provide a default implementation on this class so that your code won't break when you update to a new version of the support library.

Summary

Public constructors

An implementation of RecyclerView.OnItemTouchListener that has empty method bodies and default return values.

Public methods
open Unit
onTouchEvent(@NonNull rv: RecyclerView, @NonNull e: MotionEvent)

open Boolean
onInterceptTouchEvent(@NonNull rv: RecyclerView, @NonNull e: MotionEvent)

open Unit

Public constructors

<init>

SimpleOnItemTouchListener()

An implementation of RecyclerView.OnItemTouchListener that has empty method bodies and default return values.

You may prefer to extend this class if you don't need to override all methods. Another benefit of using this class is future compatibility. As the interface may change, we'll always provide a default implementation on this class so that your code won't break when you update to a new version of the support library.

Public methods

onTouchEvent

open fun onTouchEvent(@NonNull rv: RecyclerView, @NonNull e: MotionEvent): Unit

onInterceptTouchEvent

open fun onInterceptTouchEvent(@NonNull rv: RecyclerView, @NonNull e: MotionEvent): Boolean

onRequestDisallowInterceptTouchEvent

open fun onRequestDisallowInterceptTouchEvent(disallowIntercept: Boolean): Unit