CameraViewfinder.ScaleType

@RequiresApi(value = 21)
enum CameraViewfinder.ScaleType


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

Summary

Enum Values

FILL_CENTER

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

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.

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.

FIT_CENTER

Scale the viewfinder, maintaining the source aspect ratio, so it is entirely contained within the CameraViewfinder, and center it inside the view.

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.

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.

Public functions

java-static CameraViewfinder.ScaleType!
valueOf(name: String!)

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

java-static Array<CameraViewfinder.ScaleType!>!

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

Enum Values

FILL_CENTER

@RequiresApi(value = 21)
val CameraViewfinder.ScaleType.FILL_CENTERCameraViewfinder.ScaleType

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

@RequiresApi(value = 21)
val CameraViewfinder.ScaleType.FILL_ENDCameraViewfinder.ScaleType

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.

FILL_START

@RequiresApi(value = 21)
val CameraViewfinder.ScaleType.FILL_STARTCameraViewfinder.ScaleType

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.

FIT_CENTER

@RequiresApi(value = 21)
val CameraViewfinder.ScaleType.FIT_CENTERCameraViewfinder.ScaleType

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

@RequiresApi(value = 21)
val CameraViewfinder.ScaleType.FIT_ENDCameraViewfinder.ScaleType

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.

FIT_START

@RequiresApi(value = 21)
val CameraViewfinder.ScaleType.FIT_STARTCameraViewfinder.ScaleType

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.

Public functions

valueOf

Added in 1.3.0
java-static fun valueOf(name: String!): CameraViewfinder.ScaleType!

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.ScaleType!

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.3.0
java-static fun values(): Array<CameraViewfinder.ScaleType!>!

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
Array<CameraViewfinder.ScaleType!>!

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