ImplementationMode


public enum ImplementationMode extends 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 methods

final @NonNull EnumEntries<@NonNull ImplementationMode>

The implementation mode of a viewfinder.

final @NonNull ImplementationMode

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

final @NonNull ImplementationMode[]

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

Enum Values

COMPATIBLE

ImplementationMode ImplementationMode.COMPATIBLE

Use a TextureView for the viewfinder.

PERFORMANCE

ImplementationMode ImplementationMode.PERFORMANCE

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 methods

getEntries

public final @NonNull EnumEntries<@NonNull ImplementationModegetEntries()

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.

valueOf

Added in 1.4.0-alpha05
public final @NonNull ImplementationMode valueOf(@NonNull String value)

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
public final @NonNull ImplementationMode[] values()

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.