Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

OnContextClickListener

interface OnContextClickListener
androidx.recyclerview.selection.OnContextClickListener

Register an OnContextClickListener to be notified when a context click occurs.

Summary

Public methods

abstract Boolean

Called when user performs a context click, usually via mouse pointer right-click.

Public methods

onContextClick

abstract fun onContextClick(@NonNull e: MotionEvent): Boolean

Called when user performs a context click, usually via mouse pointer right-click.

Parameters
e MotionEvent: the event associated with the click.
Return
Boolean: true if the event was handled.