Ya está disponible la segunda Vista previa para desarrolladores de Android 11; pruébala y comparte tus comentarios.

CameraXConfig.Builder

public static final class CameraXConfig.Builder
extends Object

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


A builder for generating CameraXConfig objects.

Summary

Public methods

CameraXConfig build()

Builds an immutable CameraXConfig from the current state.

static CameraXConfig.Builder fromConfig(CameraXConfig configuration)

Generates a Builder from another CameraXConfig object

CameraXConfig.Builder setCameraExecutor(Executor executor)

Sets an executor which CameraX will use to initialize and shutdown.

Inherited methods

Public methods

build

public CameraXConfig build ()

Builds an immutable CameraXConfig from the current state.

Returns
CameraXConfig A CameraXConfig populated with the current state.

fromConfig

public static CameraXConfig.Builder fromConfig (CameraXConfig configuration)

Generates a Builder from another CameraXConfig object

Parameters
configuration CameraXConfig: An immutable configuration to pre-populate this builder.

Returns
CameraXConfig.Builder The new Builder.

setCameraExecutor

public CameraXConfig.Builder setCameraExecutor (Executor executor)

Sets an executor which CameraX will use to initialize and shutdown.

It is not necessary to set an executor for normal use. If not set, CameraX will create and use a default internal executor.

Parameters
executor Executor

Returns
CameraXConfig.Builder