---
title: "AndroidExternalSurfaceZOrder"
description: "Defines the z-order of an [AndroidExternalSurface]. When using an [AndroidExternalSurface], a new
[Surface] is created and displayed as a separate window layer whose position in the windows layer
stack relative to the parent window is decided by its z-order. This class provides constants to
set that z-order."
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-android'>Android</div>


```kotlin
value class AndroidExternalSurfaceZOrder private constructor(val zOrder: Int)
```


Defines the z-order of an `AndroidExternalSurface`. When using an `AndroidExternalSurface`, a new
`Surface` is created and displayed as a separate window layer whose position in the windows layer
stack relative to the parent window is decided by its z-order. This class provides constants to
set that z-order.


## Companion Object

#### Properties

<div class='sourceset sourceset-android'>Android</div>


```kotlin
val Behind = AndroidExternalSurfaceZOrder(0)
```


The `Surface`'s window layer is positioned behind the parent window.



<div class='sourceset sourceset-android'>Android</div>


```kotlin
val MediaOverlay = AndroidExternalSurfaceZOrder(1)
```


The `Surface`'s window layer is positioned behind the parent window but above other
`Surface` window layers marked `Behind`.



<div class='sourceset sourceset-android'>Android</div>


```kotlin
val OnTop = AndroidExternalSurfaceZOrder(2)
```


The `Surface`'s window layer is positioned above the parent window.





