SurfaceControlCompat.Builder


public final 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 methods

final @NonNull SurfaceControlCompat

Construct a new SurfaceControlCompat with the set parameters.

final @NonNull SurfaceControlCompat.Builder

Set a debugging-name for the SurfaceControlCompat.

final @NonNull SurfaceControlCompat.Builder

Set a parent SurfaceControlCompat for the new SurfaceControlCompat instance.

final @NonNull SurfaceControlCompat.Builder

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

Public constructors

Builder

Added in 1.0.2
public Builder()

Public methods

build

Added in 1.0.2
public final @NonNull SurfaceControlCompat build()

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

setName

Added in 1.0.2
public final @NonNull SurfaceControlCompat.Builder setName(@NonNull String name)

Set a debugging-name for the SurfaceControlCompat.

Parameters
@NonNull String name

Debugging name configured on the SurfaceControlCompat instance.

setParent

Added in 1.0.2
public final @NonNull SurfaceControlCompat.Builder setParent(@NonNull SurfaceControlCompat surfaceControl)

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

Parameters
@NonNull SurfaceControlCompat surfaceControl

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

setParent

Added in 1.0.2
public final @NonNull SurfaceControlCompat.Builder setParent(@NonNull SurfaceView surfaceView)

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
@NonNull SurfaceView surfaceView

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