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 |
|---|
Builder() |
Public methods |
|
|---|---|
final @NonNull SurfaceControlCompat |
build()Construct a new |
final @NonNull SurfaceControlCompat.Builder |
Set a debugging-name for the |
final @NonNull SurfaceControlCompat.Builder |
setParent(@NonNull SurfaceControlCompat surfaceControl)Set a parent |
final @NonNull SurfaceControlCompat.Builder |
setParent(@NonNull SurfaceView surfaceView)Set a parent |
Public methods
build
public final @NonNull SurfaceControlCompat build()
Construct a new SurfaceControlCompat with the set parameters. The builder remains valid after the SurfaceControlCompat instance is created.
setName
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 |
setParent
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 |
setParent
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 |