Preview.Builder

public static final class Preview.Builder
extends Object implements ExtendableBuilder<T extends UseCase>

java.lang.Object
   ↳ androidx.camera.core.Preview.Builder


Builder for a Preview.

Summary

Public constructors

Builder()

Creates a new Builder object.

Public methods

Preview build()

Builds an immutable Preview from the current state.

Preview.Builder setTargetAspectRatio(int aspectRatio)

Sets the aspect ratio of the intended target for images from this configuration.

Preview.Builder setTargetName(String targetName)

Sets the name of the target object being configured, used only for debug logging.

Preview.Builder setTargetResolution(Size resolution)

Sets the resolution of the intended target from this configuration.

Preview.Builder setTargetRotation(int rotation)

Sets the rotation that the intended target resolution is expressed in.

Inherited methods