public class

FioriItemTouchListener

extends Object
implements RecyclerView.OnItemTouchListener
java.lang.Object
   ↳ com.sap.cloud.mobile.fiori.common.FioriItemTouchListener
Known Direct Subclasses

Class Overview

Class for handling the touch events on the RecyclerView items

Summary

Fields
protected GestureDetector mGestureDetector
protected FioriItemClickListener mItemClickListener
protected RecyclerView mRecyclerView
Public Constructors
FioriItemTouchListener(RecyclerView recyclerView, FioriItemClickListener itemClickListener)
Public Methods
boolean onInterceptTouchEvent(RecyclerView recyclerView, MotionEvent motionEvent)
void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept)
Called when a child of RecyclerView does not want RecyclerView and its ancestors to intercept touch events with onInterceptTouchEvent(MotionEvent).
void onTouchEvent(RecyclerView rv, MotionEvent e)
Process a touch event as part of a gesture that was claimed by returning true from a previous call to onInterceptTouchEvent(RecyclerView, MotionEvent).
[Expand]
Inherited Methods
From class java.lang.Object
From interface androidx.recyclerview.widget.RecyclerView.OnItemTouchListener

Fields

protected GestureDetector mGestureDetector

protected FioriItemClickListener mItemClickListener

protected RecyclerView mRecyclerView

Public Constructors

public FioriItemTouchListener (RecyclerView recyclerView, FioriItemClickListener itemClickListener)

Public Methods

public boolean onInterceptTouchEvent (RecyclerView recyclerView, MotionEvent motionEvent)

public void onRequestDisallowInterceptTouchEvent (boolean disallowIntercept)

Called when a child of RecyclerView does not want RecyclerView and its ancestors to intercept touch events with onInterceptTouchEvent(MotionEvent).

Parameters
disallowIntercept True if the child does not want the parent to intercept touch events.

public void onTouchEvent (RecyclerView rv, MotionEvent e)

Process a touch event as part of a gesture that was claimed by returning true from a previous call to onInterceptTouchEvent(RecyclerView, MotionEvent).

Parameters
e MotionEvent describing the touch event. All coordinates are in