public enum ScaleType extends Enum


Options for scaling the input frames vis-à-vis its container viewfinder.

Summary

Enum Values

FILL_CENTER

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

FILL_END

Scale the input frames, maintaining the source aspect ratio, so it fills the entire viewfinder, and align it to the end of the viewfinder, 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 input frames, maintaining the source aspect ratio, so it fills the entire viewfinder, and align it to the start of the viewfinder, 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 input frames, maintaining the source aspect ratio, so it is entirely contained within the viewfinder, and center it inside the viewfinder.

FIT_END

Scale the input frames, maintaining the source aspect ratio, so it is entirely contained within the viewfinder, and align it to the end of the viewfinder, 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 input frames, maintaining the source aspect ratio, so it is entirely contained within the viewfinder, and align it to the start of the viewfinder, 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 methods

final @NonNull EnumEntries<@NonNull ScaleType>

Options for scaling the input frames vis-à-vis its container viewfinder.

final @NonNull ScaleType

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

final @NonNull ScaleType[]

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

Enum Values

FILL_CENTER

ScaleType ScaleType.FILL_CENTER

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

This may cause the input frames to be cropped if the input frame aspect ratio does not match that of its container viewfinder.

FILL_END

ScaleType ScaleType.FILL_END

Scale the input frames, maintaining the source aspect ratio, so it fills the entire viewfinder, and align it to the end of the viewfinder, 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 input frames to be cropped if the input frame aspect ratio does not match that of its container viewfinder.

FILL_START

ScaleType ScaleType.FILL_START

Scale the input frames, maintaining the source aspect ratio, so it fills the entire viewfinder, and align it to the start of the viewfinder, 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 input frames to be cropped if the input frame aspect ratio does not match that of its container viewfinder.

FIT_CENTER

ScaleType ScaleType.FIT_CENTER

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

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

FIT_END

ScaleType ScaleType.FIT_END

Scale the input frames, maintaining the source aspect ratio, so it is entirely contained within the viewfinder, and align it to the end of the viewfinder, 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 input frames will be black or the background color of the viewfinder.

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

FIT_START

ScaleType ScaleType.FIT_START

Scale the input frames, maintaining the source aspect ratio, so it is entirely contained within the viewfinder, and align it to the start of the viewfinder, 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 input frames will be black or the background color of the viewfinder.

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

Public methods

getEntries

public final @NonNull EnumEntries<@NonNull ScaleTypegetEntries()

Options for scaling the input frames vis-à-vis its container viewfinder.

valueOf

Added in 1.4.0-alpha13
public final @NonNull ScaleType valueOf(@NonNull String value)

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.)

Throws
kotlin.IllegalArgumentException

if this enum type has no constant with the specified name

values

Added in 1.4.0-alpha13
public final @NonNull ScaleType[] 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.