public enum

CameraViewfinder.ScaleType

extends java.lang.Enum<CameraViewfinder.ScaleType>

 java.lang.Object

↳java.lang.Enum<CameraViewfinder.ScaleType>

↳androidx.camera.viewfinder.CameraViewfinder.ScaleType

Overview

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

Summary

Enum Constants
FILL_CENTERScale the viewfinder, maintaining the source aspect ratio, so it fills the entire CameraViewfinder, and center it in the view.
FILL_ENDScale the viewfinder, maintaining the source aspect ratio, so it fills the entire CameraViewfinder, and align it to the end of the view, which is the bottom right corner in a left-to-right (LTR) layout, or the bottom left corner in a right-to-left (RTL) layout.
FILL_STARTScale the viewfinder, maintaining the source aspect ratio, so it fills the entire CameraViewfinder, and align it to the start of the view, which is the top left corner in a left-to-right (LTR) layout, or the top right corner in a right-to-left (RTL) layout.
FIT_CENTERScale the viewfinder, maintaining the source aspect ratio, so it is entirely contained within the CameraViewfinder, and center it inside the view.
FIT_ENDScale the viewfinder, maintaining the source aspect ratio, so it is entirely contained within the CameraViewfinder, and align it to the end of the view, which is the bottom right corner in a left-to-right (LTR) layout, or the bottom left corner in a right-to-left (RTL) layout.
FIT_STARTScale the viewfinder, maintaining the source aspect ratio, so it is entirely contained within the CameraViewfinder, and align it to the start of the view, which is the top left corner in a left-to-right (LTR) layout, or the top right corner in a right-to-left (RTL) layout.
Methods
public static CameraViewfinder.ScaleTypevalueOf(java.lang.String name)

public static CameraViewfinder.ScaleTypevalues()

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

FILL_START

Scale the viewfinder, maintaining the source aspect ratio, so it fills the entire CameraViewfinder, and align it to the start of the view, which is the top left corner in a left-to-right (LTR) layout, or the top right corner in a right-to-left (RTL) layout.

This may cause the viewfinder to be cropped if the camera viewfinder aspect ratio does not match that of its container CameraViewfinder.

FILL_CENTER

Scale the viewfinder, maintaining the source aspect ratio, so it fills the entire CameraViewfinder, and center it in the view.

This may cause the viewfinder to be cropped if the camera viewfinder aspect ratio does not match that of its container CameraViewfinder.

FILL_END

Scale the viewfinder, maintaining the source aspect ratio, so it fills the entire CameraViewfinder, and align it to the end of the view, which is the bottom right corner in a left-to-right (LTR) layout, or the bottom left corner in a right-to-left (RTL) layout.

This may cause the viewfinder to be cropped if the camera viewfinder aspect ratio does not match that of its container CameraViewfinder.

FIT_START

Scale the viewfinder, maintaining the source aspect ratio, so it is entirely contained within the CameraViewfinder, and align it to the start of the view, which is the top left corner in a left-to-right (LTR) layout, or the top right corner in a right-to-left (RTL) layout. The background area not covered by the viewfinder stream will be black or the background of the CameraViewfinder

Both dimensions of the viewfinder will be equal or less than the corresponding dimensions of its container CameraViewfinder.

FIT_CENTER

Scale the viewfinder, maintaining the source aspect ratio, so it is entirely contained within the CameraViewfinder, and center it inside the view. The background area not covered by the viewfinder stream will be black or the background of the CameraViewfinder.

Both dimensions of the viewfinder will be equal or less than the corresponding dimensions of its container CameraViewfinder.

FIT_END

Scale the viewfinder, maintaining the source aspect ratio, so it is entirely contained within the CameraViewfinder, and align it to the end of the view, which is the bottom right corner in a left-to-right (LTR) layout, or the bottom left corner in a right-to-left (RTL) layout. The background area not covered by the viewfinder stream will be black or the background of the CameraViewfinder.

Both dimensions of the viewfinder will be equal or less than the corresponding dimensions of its container CameraViewfinder.

Methods

public static CameraViewfinder.ScaleType values()

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