Stay organized with collections
Save and categorize content based on your preferences.
ExpandableListContextMenuInfo
open class ExpandableListContextMenuInfo : ContextMenu.ContextMenuInfo
Extra menu information specific to an ExpandableListView
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 ID of the item (group or child) for which the context menu is being displayed.
|
Long |
The packed position in the list represented by the adapter for which the context menu is being displayed.
|
View! |
The view for which the context menu is being displayed.
|
Public constructors
ExpandableListContextMenuInfo
ExpandableListContextMenuInfo(
targetView: View!,
packedPosition: Long,
id: Long)
Properties
id
var id: Long
The ID of the item (group or child) for which the context menu is being displayed.
targetView
var targetView: View!
The view for which the context menu is being displayed. This will be one of the children Views of this ExpandableListView
.
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,["# ExpandableListView.ExpandableListContextMenuInfo\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nExpandableListContextMenuInfo\n=============================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/widget/ExpandableListView.ExpandableListContextMenuInfo \"View this page in Java\") \n\n```\nopen class ExpandableListContextMenuInfo : ContextMenu.ContextMenuInfo\n```\n\n|---|----------------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.widget.ExpandableListView.ExpandableListContextMenuInfo](#) |\n\nExtra menu information specific to an [ExpandableListView](/reference/kotlin/android/widget/ExpandableListView) 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| [ExpandableListContextMenuInfo](#ExpandableListContextMenuInfo(android.view.View,%20kotlin.Long,%20kotlin.Long))`(`targetView:` `[View](../view/View.html#)!`, `packedPosition:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/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 ID of the item (group or child) for which the context menu is being displayed. |\n| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | [packedPosition](#packedPosition:kotlin.Long) The packed position in the list represented by the adapter for which the context menu is being displayed. |\n| [View](../view/View.html#)! | [targetView](#targetView:android.view.View) The view for which the context menu is being displayed. |\n\nPublic constructors\n-------------------\n\n### ExpandableListContextMenuInfo\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nExpandableListContextMenuInfo(\n targetView: View!, \n packedPosition: Long, \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 ID of the item (group or child) for which the context menu is being displayed. \n\n### packedPosition\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nvar packedPosition: Long\n```\n\nThe packed position in the list represented by the adapter for which the context menu is being displayed. Use the methods [ExpandableListView.getPackedPositionType](/reference/kotlin/android/widget/ExpandableListView#getPackedPositionType(kotlin.Long)), [ExpandableListView.getPackedPositionChild](/reference/kotlin/android/widget/ExpandableListView#getPackedPositionChild(kotlin.Long)), and [ExpandableListView.getPackedPositionGroup](/reference/kotlin/android/widget/ExpandableListView#getPackedPositionGroup(kotlin.Long)) to unpack this. \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 view for which the context menu is being displayed. This will be one of the children Views of this [ExpandableListView](/reference/kotlin/android/widget/ExpandableListView)."]]