SurfaceControlCompat.Builder


class SurfaceControlCompat.Builder


Builder class for SurfaceControlCompat objects. By default the Surface will be hidden, and have "unset" bounds, meaning it can be as large as the bounds of its parent if a buffer or child so requires. It is necessary to set at least a name via Builder.setName

Summary

Public constructors

Public functions

SurfaceControlCompat

Construct a new SurfaceControlCompat with the set parameters.

SurfaceControlCompat.Builder
setName(name: String)

Set a debugging-name for the SurfaceControlCompat.

SurfaceControlCompat.Builder

Set a parent SurfaceControlCompat for the new SurfaceControlCompat instance.

SurfaceControlCompat.Builder
setParent(surfaceView: SurfaceView)

Set a parent Surface from the provided SurfaceView for our new SurfaceControlCompat.

Public constructors

Builder

Added in 1.0.0-rc01
Builder()

Public functions

build

Added in 1.0.0-rc01
fun build(): SurfaceControlCompat

Construct a new SurfaceControlCompat with the set parameters. The builder remains valid after the SurfaceControlCompat instance is created.

setName

Added in 1.0.0-rc01
fun setName(name: String): SurfaceControlCompat.Builder

Set a debugging-name for the SurfaceControlCompat.

Parameters
name: String

Debugging name configured on the SurfaceControlCompat instance.

setParent

Added in 1.0.0-rc01
fun setParent(surfaceControl: SurfaceControlCompat): SurfaceControlCompat.Builder

Set a parent SurfaceControlCompat for the new SurfaceControlCompat instance. Furthermore they stack relatively in Z order, and inherit the transformation of the parent.

Parameters
surfaceControl: SurfaceControlCompat

Target SurfaceControlCompat used as the parent for the newly created SurfaceControlCompat instance

setParent

Added in 1.0.0-rc01
fun setParent(surfaceView: SurfaceView): SurfaceControlCompat.Builder

Set a parent Surface from the provided SurfaceView for our new SurfaceControlCompat. Child surfaces are constrained to the onscreen region of their parent. Furthermore they stack relatively in Z order, and inherit the transformation of the parent.

Parameters
surfaceView: SurfaceView

Target SurfaceView used to provide the Surface this SurfaceControlCompat is associated with.