androidx.camera.viewfinder


Core dependencies for Viewfinder

Classes

CameraViewfinder

Base viewfinder widget that can display the camera feed for Camera2.

ViewfinderSurfaceRequest

This class is deprecated.

Use androidx.camera.viewfinder.surface.ViewfinderSurfaceRequest instead.

ViewfinderSurfaceRequest.Builder

This class is deprecated.

Use androidx.camera.viewfinder.surface.ViewfinderSurfaceRequest.Builder instead.

Objects

Enums

CameraViewfinder.ImplementationMode

This enum is deprecated.

Use androidx.camera.viewfinder.surface.ImplementationMode instead.

CameraViewfinder.ScaleType

Options for scaling the viewfinder vis-à-vis its container CameraViewfinder.

Extension functions summary

ViewfinderSurfaceRequest.Builder

This function is deprecated. Use androidx.camera.viewfinder.surface.ViewfinderSurfaceRequest as argument

Extension functions

populateFromCharacteristics

fun ViewfinderSurfaceRequest.Builder.populateFromCharacteristics(
    cameraCharacteristics: CameraCharacteristics
): ViewfinderSurfaceRequest.Builder

Populates ViewfinderSurfaceRequest.Builder from CameraCharacteristics.

The CameraCharacteristics will be used to populate information including lens facing, sensor orientation and ImplementationMode. If the hardware level is legacy, the ImplementationMode will be set to ImplementationMode.COMPATIBLE.