Stay organized with collections
Save and categorize content based on your preferences.
open class AdapterContextMenuInfo : ContextMenu.ContextMenuInfo
Extra menu information provided to the android.view.View.OnCreateContextMenuListener#onCreateContextMenu(ContextMenu, View, ContextMenuInfo)
callback when a context menu is brought up for this AdapterView.
Summary
Properties |
Long |
The row id of the item for which the context menu is being displayed.
|
Int |
The position in the adapter for which the context menu is being displayed.
|
View! |
The child view for which the context menu is being displayed.
|
Public constructors
AdapterContextMenuInfo(
targetView: View!,
position: Int,
id: Long)
Properties
id
var id: Long
The row id of the item for which the context menu is being displayed.
position
var position: Int
The position in the adapter for which the context menu is being displayed.
targetView
var targetView: View!
The child view for which the context menu is being displayed. This will be one of the children of this AdapterView.
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# AdapterView.AdapterContextMenuInfo\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nAdapterContextMenuInfo\n======================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/widget/AdapterView.AdapterContextMenuInfo \"View this page in Java\") \n\n```\nopen class AdapterContextMenuInfo : ContextMenu.ContextMenuInfo\n```\n\n|---|--------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.widget.AdapterView.AdapterContextMenuInfo](#) |\n\nExtra menu information provided to the [android.view.View.OnCreateContextMenuListener#onCreateContextMenu(ContextMenu, View, ContextMenuInfo)](../view/View.OnCreateContextMenuListener.html#onCreateContextMenu(android.view.ContextMenu,%20android.view.View,%20android.view.ContextMenu.ContextMenuInfo)) callback when a context menu is brought up for this AdapterView.\n\nSummary\n-------\n\n| Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [AdapterContextMenuInfo](#AdapterContextMenuInfo(android.view.View,%20kotlin.Int,%20kotlin.Long))`(`targetView:` `[View](../view/View.html#)!`, `position:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `id:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` \u003cbr /\u003e |\n\n| Properties ||\n|------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|\n| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | [id](#id:kotlin.Long) The row id of the item for which the context menu is being displayed. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [position](#position:kotlin.Int) The position in the adapter for which the context menu is being displayed. |\n| [View](../view/View.html#)! | [targetView](#targetView:android.view.View) The child view for which the context menu is being displayed. |\n\nPublic constructors\n-------------------\n\n### AdapterContextMenuInfo\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nAdapterContextMenuInfo(\n targetView: View!, \n position: Int, \n id: Long)\n```\n\nProperties\n----------\n\n### id\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nvar id: Long\n```\n\nThe row id of the item for which the context menu is being displayed. \n\n### position\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nvar position: Int\n```\n\nThe position in the adapter for which the context menu is being displayed. \n\n### targetView\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nvar targetView: View!\n```\n\nThe child view for which the context menu is being displayed. This will be one of the children of this AdapterView."]]