Skip to content

Most visited

Recently visited

added in API level 23


public static interface GestureDetector.OnContextClickListener

Known Indirect Subclasses

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


Public methods

abstract boolean onContextClick(MotionEvent e)

Notified when a context click occurs.

Public methods


added in API level 23
boolean onContextClick (MotionEvent e)

Notified when a context click occurs.

e MotionEvent: The motion event that occurred during the context click.
boolean true if the event is consumed, else false
This site uses cookies to store your preferences for site-specific language and display options.


This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.