Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in API level 23

GestureDetector.OnContextClickListener

public static interface GestureDetector.OnContextClickListener

android.view.GestureDetector.OnContextClickListener


The listener that is used to notify when a context click occurs. When listening for a context click ensure that you call GestureDetector.onGenericMotionEvent(MotionEvent) in View.onGenericMotionEvent(MotionEvent).

Summary

Public methods

abstract boolean onContextClick(MotionEvent e)

Notified when a context click occurs.

Public methods

onContextClick

added in API level 23
public abstract boolean onContextClick (MotionEvent e)

Notified when a context click occurs.

Parameters
e MotionEvent: The motion event that occurred during the context click.

Returns
boolean true if the event is consumed, else false