# OnChildLaidOutListener

# OnChildLaidOutListener

Artifact:[androidx.leanback:leanback-grid](https://developer.android.com/jetpack/androidx/releases/leanback)  
[View Source](https://cs.android.com/search?q=file:androidx/leanback/widget/OnChildLaidOutListener.java+class:androidx.leanback.widget.OnChildLaidOutListener)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.0.0)

*** ** * ** ***

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

<br />

```
interface OnChildLaidOutListener
```

<br />

*** ** * ** ***

Interface for receiving notification when a child of this ViewGroup has been laid out.

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onChildLaidOut](https://developer.android.com/reference/kotlin/androidx/leanback/widget/OnChildLaidOutListener#onChildLaidOut(android.view.ViewGroup,android.view.View,int,long))`(parent: `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)`, view: `[View](https://developer.android.com/reference/android/view/View.html)`, position: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, id: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Callback method to be invoked when a child of this ViewGroup has been added to the view hierarchy and has been laid out. |

## Public functions

### onChildLaidOut

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.0.0)  

```
fun onChildLaidOut(parent: ViewGroup, view: View, position: Int, id: Long): Unit
```

Callback method to be invoked when a child of this ViewGroup has been added to the view hierarchy and has been laid out.  

|                                         Parameters                                         |
|--------------------------------------------------------------------------------------------|--------------------------------------------------|
| `parent: `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html) | The ViewGroup where the layout happened.         |
| `view: `[View](https://developer.android.com/reference/android/view/View.html)             | The view within the ViewGroup that was laid out. |
| `position: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)    | The position of the view in the adapter.         |
| `id: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)        | The id of the child.                             |