Stay organized with collections Save and categorize content based on your preferences.

CameraViewFinder.ImplementationMode

@RequiresApi(value = 21)
public enum CameraViewFinder.ImplementationMode


The implementation mode of a CameraViewFinder.

User preference on how the CameraViewFinder should render the preview. CameraViewFinder displays the preview 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 preview.

PERFORMANCE

Use a SurfaceView for the preview 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

@RequiresApi(value = 21)
CameraViewFinder.ImplementationMode CameraViewFinder.ImplementationMode.PERFORMANCE

Use a SurfaceView for the preview when possible. 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.

Public methods

valueOf

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 java.lang.IllegalArgumentException

if this enum type has no constant with the specified name

values

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