Stay organized with collections
Save and categorize content based on your preferences.
ExpandableListView.OnChildClickListener
public
static
interface
ExpandableListView.OnChildClickListener
android.widget.ExpandableListView.OnChildClickListener
|
Known indirect subclasses
|
Interface definition for a callback to be invoked when a child in this
expandable list has been clicked.
Summary
Public methods |
abstract
boolean
|
onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id)
Callback method to be invoked when a child in this expandable list has
been clicked.
|
Public methods
public abstract boolean onChildClick (ExpandableListView parent,
View v,
int groupPosition,
int childPosition,
long id)
Callback method to be invoked when a child in this expandable list has
been clicked.
Parameters |
parent |
ExpandableListView : The ExpandableListView where the click happened |
v |
View : The view within the expandable list/ListView that was clicked |
groupPosition |
int : The group position that contains the child that
was clicked |
childPosition |
int : The child position within the group |
id |
long : The row id of the child that was clicked |
Returns |
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.OnChildClickListener\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Methods](#pubmethods) \n\nExpandableListView.OnChildClickListener\n=======================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/widget/ExpandableListView.OnChildClickListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nExpandableListView.OnChildClickListener\n`\n\n\n`\n\n\n`\n\n|--------------------------------------------------------|\n| android.widget.ExpandableListView.OnChildClickListener |\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known indirect subclasses [ExpandableListActivity](/reference/android/app/ExpandableListActivity) |-------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [ExpandableListActivity](/reference/android/app/ExpandableListActivity) | *This class was deprecated in API level 30. Use [RecyclerView](https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView.html) or use [ExpandableListView](/reference/android/widget/ExpandableListView) directly* | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface definition for a callback to be invoked when a child in this\nexpandable list has been clicked.\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract boolean` | ` `[onChildClick](/reference/android/widget/ExpandableListView.OnChildClickListener#onChildClick(android.widget.ExpandableListView,%20android.view.View,%20int,%20int,%20long))`(`[ExpandableListView](/reference/android/widget/ExpandableListView)` parent, `[View](/reference/android/view/View)` v, int groupPosition, int childPosition, long id) ` Callback method to be invoked when a child in this expandable list has been clicked. |\n\nPublic methods\n--------------\n\n### onChildClick\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract boolean onChildClick (ExpandableListView parent, \n View v, \n int groupPosition, \n int childPosition, \n long id)\n```\n\nCallback method to be invoked when a child in this expandable list has\nbeen clicked.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------------|------------------------------------------------------------------------------|\n| `parent` | `ExpandableListView`: The ExpandableListView where the click happened \u003cbr /\u003e |\n| `v` | `View`: The view within the expandable list/ListView that was clicked \u003cbr /\u003e |\n| `groupPosition` | `int`: The group position that contains the child that was clicked \u003cbr /\u003e |\n| `childPosition` | `int`: The child position within the group \u003cbr /\u003e |\n| `id` | `long`: The row id of the child that was clicked \u003cbr /\u003e |\n\n| Returns ||\n|-----------|--------------------------------------|\n| `boolean` | True if the click was handled \u003cbr /\u003e |"]]