ImplementationMode
enum ImplementationMode : Enum
The implementation mode of a Viewfinder.
User preference on how the viewfinder should render the viewfinder. The viewfinder is displayed with either a SurfaceView/AndroidExternalSurface or a TextureView/AndroidEmbeddedExternalSurface.
-
EXTERNALuses a SurfaceView/AndroidExternalSurface, it is generally better when it comes to certain key metrics, including power and latency. -
EMBEDDEDuses a TextureView/AndroidEmbeddedExternalSurface it is better supported by a wider range of devices.
The option is used to decide what is the best internal implementation given the device capabilities and user configurations.
Summary
Enum Values |
|
|---|---|
EMBEDDED |
Use a TextureView/AndroidEmbeddedExternalSurface for the Viewfinder. |
EXTERNAL |
Use a SurfaceView/AndroidExternalSurface for the Viewfinder when possible. |
Public functions |
|
|---|---|
ImplementationMode |
Returns the enum constant of this type with the specified name. |
Array<ImplementationMode> |
values()Returns an array containing the constants of this enum type, in the order they're declared. |
Public properties |
|
|---|---|
EnumEntries<ImplementationMode> |
Returns a representation of an immutable list of all enum entries, in the order they're declared. |
Enum Values
EMBEDDED
val ImplementationMode.EMBEDDED: ImplementationMode
Use a TextureView/AndroidEmbeddedExternalSurface for the Viewfinder.
EXTERNAL
val ImplementationMode.EXTERNAL: ImplementationMode
Use a SurfaceView/AndroidExternalSurface for the Viewfinder when possible. It has somewhat lower latency and less performance and power overhead. It offers more control on a single drawing board, but does not support certain animations.
Public functions
valueOf
fun valueOf(value: String): ImplementationMode
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
fun values(): Array<ImplementationMode>
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.
Public properties
entries
val entries: EnumEntries<ImplementationMode>
Returns a representation of an immutable list of all enum entries, in the order they're declared.
This method may be used to iterate over the enum entries.