Stay organized with collections
Save and categorize content based on your preferences.
View.OnContextClickListener
public
static
interface
View.OnContextClickListener
android.view.View.OnContextClickListener
|
Interface definition for a callback to be invoked when a view is context clicked.
Summary
Public methods |
abstract
boolean
|
onContextClick(View v)
Called when a view is context clicked.
|
Public methods
onContextClick
public abstract boolean onContextClick (View v)
Called when a view is context clicked.
Parameters |
v |
View : The view that has been context clicked. |
Returns |
boolean |
true if the callback consumed the context click, false otherwise. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# View.OnContextClickListener\n\nAdded in [API level 23](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nView.OnContextClickListener\n===========================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/view/View.OnContextClickListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nView.OnContextClickListener\n`\n\n\n`\n\n\n`\n\n|------------------------------------------|\n| android.view.View.OnContextClickListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface definition for a callback to be invoked when a view is context clicked.\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract boolean` | ` `[onContextClick](/reference/android/view/View.OnContextClickListener#onContextClick(android.view.View))`(`[View](/reference/android/view/View)` v) ` Called when a view is context clicked. |\n\nPublic methods\n--------------\n\n### onContextClick\n\nAdded in [API level 23](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract boolean onContextClick (View v)\n```\n\nCalled when a view is context clicked.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----|--------------------------------------------------------|\n| `v` | `View`: The view that has been context clicked. \u003cbr /\u003e |\n\n| Returns ||\n|-----------|--------------------------------------------------------------------------|\n| `boolean` | true if the callback consumed the context click, false otherwise. \u003cbr /\u003e |"]]