# AndroidExternalSurfaceZOrder

# AndroidExternalSurfaceZOrder

Artifact:[androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation)  
[View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/AndroidExternalSurface.android.kt+class:androidx.compose.foundation.AndroidExternalSurfaceZOrder)  
Added in[1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0)
Common/AllAndroid/JVM
  - android  

  ```
  value class AndroidExternalSurfaceZOrder
  ```

*** ** * ** ***

Defines the z-order of an[AndroidExternalSurface](https://developer.android.com/reference/kotlin/androidx/compose/foundation/package-summary#AndroidExternalSurface(androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.ui.unit.IntSize,androidx.compose.foundation.AndroidExternalSurfaceZOrder,kotlin.Boolean,kotlin.Function1)). When using an[AndroidExternalSurface](https://developer.android.com/reference/kotlin/androidx/compose/foundation/package-summary#AndroidExternalSurface(androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.ui.unit.IntSize,androidx.compose.foundation.AndroidExternalSurfaceZOrder,kotlin.Boolean,kotlin.Function1)), a new[Surface](https://developer.android.com/reference/android/view/Surface.html)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.

## Summary

|                                                     ### Public companion properties                                                     |
|-----------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
| [AndroidExternalSurfaceZOrder](https://developer.android.com/reference/kotlin/androidx/compose/foundation/AndroidExternalSurfaceZOrder) | [Behind](https://developer.android.com/reference/kotlin/androidx/compose/foundation/AndroidExternalSurfaceZOrder#Behind()) The[Surface](https://developer.android.com/reference/android/view/Surface.html)'s window layer is positioned behind the parent window.                                                                                                                                                                                                                                                       | android |
| [AndroidExternalSurfaceZOrder](https://developer.android.com/reference/kotlin/androidx/compose/foundation/AndroidExternalSurfaceZOrder) | [MediaOverlay](https://developer.android.com/reference/kotlin/androidx/compose/foundation/AndroidExternalSurfaceZOrder#MediaOverlay()) The[Surface](https://developer.android.com/reference/android/view/Surface.html)'s window layer is positioned behind the parent window but above other[Surface](https://developer.android.com/reference/android/view/Surface.html)window layers marked[Behind](https://developer.android.com/reference/kotlin/androidx/compose/foundation/AndroidExternalSurfaceZOrder#Behind()). | android |
| [AndroidExternalSurfaceZOrder](https://developer.android.com/reference/kotlin/androidx/compose/foundation/AndroidExternalSurfaceZOrder) | [OnTop](https://developer.android.com/reference/kotlin/androidx/compose/foundation/AndroidExternalSurfaceZOrder#OnTop()) The[Surface](https://developer.android.com/reference/android/view/Surface.html)'s window layer is positioned above the parent window.                                                                                                                                                                                                                                                          | android |

|                            ### Public properties                            |
|-----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|---------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [zOrder](https://developer.android.com/reference/kotlin/androidx/compose/foundation/AndroidExternalSurfaceZOrder#zOrder()) | android |

## Public companion properties

### Behind

android  
Added in[1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0)  

```
val Behind: AndroidExternalSurfaceZOrder
```

The[Surface](https://developer.android.com/reference/android/view/Surface.html)'s window layer is positioned behind the parent window.  

### MediaOverlay

android  
Added in[1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0)  

```
val MediaOverlay: AndroidExternalSurfaceZOrder
```

The[Surface](https://developer.android.com/reference/android/view/Surface.html)'s window layer is positioned behind the parent window but above other[Surface](https://developer.android.com/reference/android/view/Surface.html)window layers marked[Behind](https://developer.android.com/reference/kotlin/androidx/compose/foundation/AndroidExternalSurfaceZOrder#Behind()).  

### OnTop

android  
Added in[1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0)  

```
val OnTop: AndroidExternalSurfaceZOrder
```

The[Surface](https://developer.android.com/reference/android/view/Surface.html)'s window layer is positioned above the parent window.

## Public properties

### zOrder

android  
Added in[1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0)  

```
val zOrder: Int
```