# ExpandableListView.ExpandableListContextMenuInfo

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# ExpandableListContextMenuInfo

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/widget/ExpandableListView.ExpandableListContextMenuInfo "View this page in Java")  

```
open class ExpandableListContextMenuInfo : ContextMenu.ContextMenuInfo
```

|---|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                                     ||
| ↳ | [android.widget.ExpandableListView.ExpandableListContextMenuInfo](https://developer.android.com/reference/kotlin/android/widget/ExpandableListView.ExpandableListContextMenuInfo#) |

Extra menu information specific to an[ExpandableListView](https://developer.android.com/reference/kotlin/android/widget/ExpandableListView)provided to the[android.view.View.OnCreateContextMenuListener#onCreateContextMenu(ContextMenu, View, ContextMenuInfo)](https://developer.android.com/reference/kotlin/android/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.

## Summary

|                                                                                                                                                                                                                                                         Public constructors                                                                                                                                                                                                                                                         ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [ExpandableListContextMenuInfo](https://developer.android.com/reference/kotlin/android/widget/ExpandableListView.ExpandableListContextMenuInfo#ExpandableListContextMenuInfo(android.view.View,%20kotlin.Long,%20kotlin.Long))`(`targetView:` `[View](https://developer.android.com/reference/kotlin/android/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)`)` <br /> |

|                                                                                                                                                                       Properties                                                                                                                                                                       ||
|---------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)    | [id](https://developer.android.com/reference/kotlin/android/widget/ExpandableListView.ExpandableListContextMenuInfo#id:kotlin.Long) The ID of the item (group or child) for which the context menu is being displayed.                                                |
| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)    | [packedPosition](https://developer.android.com/reference/kotlin/android/widget/ExpandableListView.ExpandableListContextMenuInfo#packedPosition:kotlin.Long) The packed position in the list represented by the adapter for which the context menu is being displayed. |
| [View](https://developer.android.com/reference/kotlin/android/view/View.html#)! | [targetView](https://developer.android.com/reference/kotlin/android/widget/ExpandableListView.ExpandableListContextMenuInfo#targetView:android.view.View) The view for which the context menu is being displayed.                                                     |

## Public constructors

### ExpandableListContextMenuInfo

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
ExpandableListContextMenuInfo(
    targetView: View!, 
    packedPosition: Long, 
    id: Long)
```

## Properties

### id

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
var id: Long
```

The ID of the item (group or child) for which the context menu is being displayed.  

### packedPosition

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
var packedPosition: Long
```

The packed position in the list represented by the adapter for which the context menu is being displayed. Use the methods[ExpandableListView.getPackedPositionType](https://developer.android.com/reference/kotlin/android/widget/ExpandableListView#getPackedPositionType(kotlin.Long)),[ExpandableListView.getPackedPositionChild](https://developer.android.com/reference/kotlin/android/widget/ExpandableListView#getPackedPositionChild(kotlin.Long)), and[ExpandableListView.getPackedPositionGroup](https://developer.android.com/reference/kotlin/android/widget/ExpandableListView#getPackedPositionGroup(kotlin.Long))to unpack this.  

### targetView

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
var targetView: View!
```

The view for which the context menu is being displayed. This will be one of the children Views of this[ExpandableListView](https://developer.android.com/reference/kotlin/android/widget/ExpandableListView).