ImplementationMode


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 or a TextureView. A SurfaceView is generally better than a TextureView when it comes to certain key metrics, including power and latency. On the other hand, TextureView 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

COMPATIBLE

Use a TextureView for the viewfinder.

PERFORMANCE

Use a SurfaceView 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

COMPATIBLE

val ImplementationMode.COMPATIBLEImplementationMode

Use a TextureView for the viewfinder.

PERFORMANCE

val ImplementationMode.PERFORMANCEImplementationMode

Use a SurfaceView for the viewfinder when possible. A SurfaceView has somewhat lower latency and less performance and power overhead than a TextureView. SurfaceView offers more control on a single drawing board, but does not support certain animations.

Public functions

valueOf

Added in 1.4.0-alpha05
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-alpha05
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.