DragHandlerController

class DragHandlerController(val view: View, onTouchListener: View.OnTouchListener, onClickListener: View.OnClickListener, onLongPress: Consumer<Unit>)

Controller class for handling drag events on a view.

This class uses a GestureDetector to detect various touch events like down, long press, and single tap up. It then invokes the provided listeners for these events.

It also provides methods to check if a touch event is within the bounds of the view and to handle intercepted touch events.

Parameters

view

The view to handle drag events for.

onTouchListener

The listener for touch events.

onClickListener

The listener for click events.

onLongPress

The listener for long press events.

Constructors

Link copied to clipboard
constructor(view: View, onTouchListener: View.OnTouchListener, onClickListener: View.OnClickListener, onLongPress: Consumer<Unit>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val view: View

Functions

Link copied to clipboard
fun isInArea(view: View, ev: MotionEvent): Boolean
Link copied to clipboard
Link copied to clipboard