CameraViewfinder.ImplementationMode


enum CameraViewfinder.ImplementationMode


The implementation mode of a CameraViewfinder.

User preference on how the CameraViewfinder should render the viewfinder. CameraViewfinder displays the viewfinder 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 by CameraViewfinder 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

java-static CameraViewfinder.ImplementationMode!
valueOf(name: String!)

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

java-static Array<CameraViewfinder.ImplementationMode!>!

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

Enum Values

PERFORMANCE

val CameraViewfinder.ImplementationMode.PERFORMANCECameraViewfinder.ImplementationMode

Use a SurfaceView for the viewfinder when possible. A SurfaceView has somewhat lower latency and less performance and power overhead than a TextureView. Use this If the device doesn't support SurfaceView, CameraViewfinder will fall back to use a TextureView instead.

CameraViewfinder falls back to TextureView when the API level is 24 or lower, the camera hardware support level is INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY.

Public functions

valueOf

Added in 1.4.0-alpha09
java-static fun valueOf(name: String!): CameraViewfinder.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.)

Returns
CameraViewfinder.ImplementationMode!

the enum constant with the specified name

Throws
java.lang.IllegalArgumentException

if this enum type has no constant with the specified name

values

Added in 1.4.0-alpha09
java-static fun values(): Array<CameraViewfinder.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.

Returns
Array<CameraViewfinder.ImplementationMode!>!

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