Torch Switch Control

Defined under the namespace Scandit.Datacapture.Core.Ui

TorchSwitchControl
class TorchSwitchControl : Control

Added in version 6.8.0

Control that allows to toggle the torch on and off. The torch switch control hides itself automatically in case the active frame source doesn’t have a torch.

You can add this control to a view by calling DataCaptureView.addControl().

constructor()
constructor()

Added in version 8.3.0

Constructor.

torchOffImage
torchOffImage: string | null

Added in version 6.8.0

Sets the image encoded as a base64 string to use for the control button when the torch is off.

torchOffPressedImage
torchOffPressedImage: string | null

Added in version 6.8.0

Sets the image encoded as a base64 string to use for the control button when the torch is off and the button is pressed.

torchOnImage
torchOnImage: string | null

Added in version 6.8.0

Sets the image encoded as a base64 string to use for the control button when the torch is on.

torchOnPressedImage
torchOnPressedImage: string | null

Added in version 6.8.0

Sets the image encoded as a base64 string to use for the control button when the torch is on and the button is pressed.

accessibilityLabelWhenOff
accessibilityLabelWhenOff: string | null

Added in version 8.3.0

Accessibility label text used for the control button when the torch is off.

accessibilityHintWhenOff
accessibilityHintWhenOff: string | null

Added in version 8.3.0

Accessibility hint text used for the control button when the torch is off.

Note

This property will have no effect when running on Android.

accessibilityLabelWhenOn
accessibilityLabelWhenOn: string | null

Added in version 8.3.0

Accessibility label text used for the control button when the torch is on.

accessibilityHintWhenOn
accessibilityHintWhenOn: string | null

Added in version 8.3.0

Accessibility hint text used for the control button when the torch is on.

Note

This property will have no effect when running on Android.

setTorchOffImage(resource)
setTorchOffImage(resource: string): void

Added in version 6.23.0

Sets the resource to use for the control button image when the torch is off.

setTorchOffPressedImage(resource)
setTorchOffPressedImage(resource: string): void

Added in version 6.23.0

Sets the resource to use for the control button image when the torch is off and the button is pressed.

setTorchOnImage(resource)
setTorchOnImage(resource: string): void

Added in version 6.23.0

Sets the resource to use for the control button image when the torch is on.

setTorchOnPressedImage(resource)
setTorchOnPressedImage(resource: string): void

Added in version 6.23.0

Sets the resource to use for the control button image when the torch is on and the button is pressed.

setImageResource(resource)
setImageResource(resource: string): void

Added in version 6.23.0

Sets the image to be used for all the the states of this control.