public enum

CameraViewfinder.ImplementationMode

extends java.lang.Enum<CameraViewfinder.ImplementationMode>

 java.lang.Object

↳java.lang.Enum<CameraViewfinder.ImplementationMode>

↳androidx.camera.viewfinder.CameraViewfinder.ImplementationMode

Overview

The implementation mode of a CameraViewfinder.

User preference on how the CameraViewfinder should render the viewfinder. CameraViewfinder displays the viewfinder with either a or a TextureView. A 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 Constants
COMPATIBLEUse a TextureView for the viewfinder.
PERFORMANCEUse a for the viewfinder when possible.
Methods
public static CameraViewfinder.ImplementationModevalueOf(java.lang.String name)

public static CameraViewfinder.ImplementationModevalues()

from java.lang.Enum<E>clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
from java.lang.ObjectgetClass, notify, notifyAll, wait, wait, wait

Enum Constants

PERFORMANCE

Use a 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 , 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 CameraCharacteristics.

COMPATIBLE

Use a TextureView for the viewfinder.

Methods

public static CameraViewfinder.ImplementationMode valueOf(java.lang.String name)