CameraViewfinder.ImplementationMode


public 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 methods

static CameraViewfinder.ImplementationMode

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

static CameraViewfinder.ImplementationMode[]

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

Enum Values

PERFORMANCE

CameraViewfinder.ImplementationMode CameraViewfinder.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. 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 methods

valueOf

Added in 1.4.0-alpha10
public static CameraViewfinder.ImplementationMode valueOf(String name)

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-alpha10
public static CameraViewfinder.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.

Returns
CameraViewfinder.ImplementationMode[]

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