enum ImplementationMode : Enum


The implementation mode of a Viewfinder.

User preference on how the viewfinder should render the viewfinder. The viewfinder is displayed with either a SurfaceView/AndroidExternalSurface or a TextureView/AndroidEmbeddedExternalSurface.

  • EXTERNAL uses a SurfaceView/AndroidExternalSurface, it is generally better when it comes to certain key metrics, including power and latency.

  • EMBEDDED uses a TextureView/AndroidEmbeddedExternalSurface it is better supported by a wider range of devices.

The option is used to decide what is the best internal implementation given the device capabilities and user configurations.

Summary

Enum Values

EMBEDDED

Use a TextureView/AndroidEmbeddedExternalSurface for the Viewfinder.

EXTERNAL

Use a SurfaceView/AndroidExternalSurface for the Viewfinder when possible.

Public functions

ImplementationMode
valueOf(value: String)

Returns the enum constant of this type with the specified name.

Array<ImplementationMode>

Returns an array containing the constants of this enum type, in the order they're declared.

Public properties

EnumEntries<ImplementationMode>

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Enum Values

EMBEDDED

val ImplementationMode.EMBEDDEDImplementationMode

Use a TextureView/AndroidEmbeddedExternalSurface for the Viewfinder.

EXTERNAL

val ImplementationMode.EXTERNALImplementationMode

Use a SurfaceView/AndroidExternalSurface for the Viewfinder when possible. It has somewhat lower latency and less performance and power overhead. It offers more control on a single drawing board, but does not support certain animations.

Public functions

valueOf

Added in 1.4.0-alpha10
fun valueOf(value: String): ImplementationMode

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Throws
kotlin.IllegalArgumentException

if this enum type has no constant with the specified name

values

Added in 1.4.0-alpha10
fun values(): Array<ImplementationMode>

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.

Public properties

entries

val entriesEnumEntries<ImplementationMode>

Returns a representation of an immutable list of all enum entries, in the order they're declared.

This method may be used to iterate over the enum entries.