Interface

SurfaceScope

SurfaceScope is a scoped environment provided by AndroidExternalSurface and AndroidEmbeddedExternalSurface to handle Surface lifecycle events.

Source set: Android
public interface SurfaceScope

SurfaceScope is a scoped environment provided by AndroidExternalSurface and AndroidEmbeddedExternalSurface to handle Surface lifecycle events.

Functions

onChanged

Source set: Android
public fun Surface.onChanged(onChanged: Surface.(width: Int, height: Int) -> Unit)

Invokes onChanged when the surface's geometry (width and height) changes. Always invoked on the main thread.

onDestroyed

Source set: Android
public fun Surface.onDestroyed(onDestroyed: Surface.() -> Unit)

Invokes onDestroyed when the surface is destroyed. All rendering into the surface should stop immediately after onDestroyed is invoked. Always invoked on the main thread.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: