Stay organized with collections
Save and categorize content based on your preferences.
OnGroupClickListener
interface OnGroupClickListener
Interface definition for a callback to be invoked when a group in this expandable list has been clicked.
Summary
Public methods |
abstract Boolean |
Callback method to be invoked when a group in this expandable list has been clicked.
|
Public methods
onGroupClick
abstract fun onGroupClick(
parent: ExpandableListView!,
v: View!,
groupPosition: Int,
id: Long
): Boolean
Callback method to be invoked when a group in this expandable list has been clicked.
Parameters |
parent |
ExpandableListView!: The ExpandableListConnector where the click happened |
v |
View!: The view within the expandable list/ListView that was clicked |
groupPosition |
Int: The group position that was clicked |
id |
Long: The row id of the group that was clicked |
Return |
Boolean |
True if the click was handled |
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,["# ExpandableListView.OnGroupClickListener\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnGroupClickListener\n====================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/widget/ExpandableListView.OnGroupClickListener \"View this page in Java\") \n\n```\ninterface OnGroupClickListener\n```\n\n|-------------------------------------------------------------|\n| [android.widget.ExpandableListView.OnGroupClickListener](#) |\n\nInterface definition for a callback to be invoked when a group in this expandable list has been clicked.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [onGroupClick](#onGroupClick(android.widget.ExpandableListView,%20android.view.View,%20kotlin.Int,%20kotlin.Long))`(`parent:` `[ExpandableListView](/reference/kotlin/android/widget/ExpandableListView)!`, `v:` `[View](../view/View.html#)!`, `groupPosition:` `[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)`)` Callback method to be invoked when a group in this expandable list has been clicked. |\n\nPublic methods\n--------------\n\n### onGroupClick\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onGroupClick(\n parent: ExpandableListView!, \n v: View!, \n groupPosition: Int, \n id: Long\n): Boolean\n```\n\nCallback method to be invoked when a group in this expandable list has been clicked.\n\n| Parameters ||\n|-----------------|----------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | [ExpandableListView](/reference/kotlin/android/widget/ExpandableListView)!: The ExpandableListConnector where the click happened |\n| `v` | [View](../view/View.html#)!: The view within the expandable list/ListView that was clicked |\n| `groupPosition` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The group position that was clicked |\n| `id` | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html): The row id of the group that was clicked |\n\n| Return ||\n|------------------------------------------------------------------------------------|-------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | True if the click was handled |"]]