# ViewTreeObserver.OnGlobalLayoutListener

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Methods](https://developer.android.com/reference/android/view/ViewTreeObserver.OnGlobalLayoutListener#pubmethods)  

# ViewTreeObserver.OnGlobalLayoutListener

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/view/ViewTreeObserver.OnGlobalLayoutListener "View this page in Kotlin")\|Java

`
public
static


interface
ViewTreeObserver.OnGlobalLayoutListener
`  
`


`

|------------------------------------------------------|
| android.view.ViewTreeObserver.OnGlobalLayoutListener |

|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known indirect subclasses [AbsListView](https://developer.android.com/reference/android/widget/AbsListView),[ExpandableListView](https://developer.android.com/reference/android/widget/ExpandableListView),[GridView](https://developer.android.com/reference/android/widget/GridView),[ListView](https://developer.android.com/reference/android/widget/ListView),[NativeActivity](https://developer.android.com/reference/android/app/NativeActivity) |-------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------| | [AbsListView](https://developer.android.com/reference/android/widget/AbsListView)               | Base class that can be used to implement virtualized lists of items.                                                                 | | [ExpandableListView](https://developer.android.com/reference/android/widget/ExpandableListView) | A view that shows items in a vertically scrolling two-level list.                                                                    | | [GridView](https://developer.android.com/reference/android/widget/GridView)                     | A view that shows items in two-dimensional scrolling grid.                                                                           | | [ListView](https://developer.android.com/reference/android/widget/ListView)                     | Displays a vertically-scrollable collection of views, where each view is positioned immediately below the previous view in the list. | | [NativeActivity](https://developer.android.com/reference/android/app/NativeActivity)            | Convenience for implementing an activity that will be implemented purely in native code.                                             | |

<br />

*** ** * ** ***

Interface definition for a callback to be invoked when the global layout state or the visibility of views within the view tree changes.

## Summary

|                                                                                                                              ### Public methods                                                                                                                              ||
|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[onGlobalLayout](https://developer.android.com/reference/android/view/ViewTreeObserver.OnGlobalLayoutListener#onGlobalLayout())`() ` Callback method to be invoked when the global layout state or the visibility of views within the view tree changes |

## Public methods

### onGlobalLayout

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

```
public abstract void onGlobalLayout ()
```

Callback method to be invoked when the global layout state or the visibility of views within the view tree changes

<br />