The Developer Preview for Android 11 is now available; test it out and share your feedback.

Builder

interface Builder<T : Any!, B : Any!>
androidx.camera.core.internal.TargetConfig.Builder

Builder for a TargetConfig.

A TargetConfig contains options used to identify the target class and object being configured.

Summary

Public methods

abstract B
setTargetClass(@NonNull targetClass: Class<T>)

Sets the class of the object being configured.

abstract B
setTargetName(@NonNull targetName: String)

Sets the name of the target object being configured.

Public methods

setTargetClass

@NonNull abstract fun setTargetClass(@NonNull targetClass: Class<T>): B

Sets the class of the object being configured.

Setting the target class will automatically generate a unique target name if one does not already exist in this configuration.

Parameters
targetClass Class<T>: A class object corresponding to the class of the object being configured.
Return
B: the current Builder.

setTargetName

@NonNull abstract fun setTargetName(@NonNull targetName: String): B

Sets the name of the target object being configured.

The name should be a value that can uniquely identify an instance of the object being configured.

Parameters
targetName String: A unique string identifier for the instance of the class being configured.
Return
B: the current Builder.