Focus Gestures

Defined in package com.scandit.datacapture.core.ui.gesture

FocusGesture
interface FocusGesture

Added in version 6.6.0

Common interface for all the focus gestures.

triggerFocus(point)
void triggerFocus(@NonNull PointWithUnit point)

Added in version 6.7.0

Triggers a focus as if the focus gesture was performed.

addListener(listener)
void addListener(@NonNull FocusGestureListener listener)

Added in version 6.7.0

Adds the listener to this gesture.

In case the same listener is already observing this instance, calling this method will not add the listener again.

removeListener(listener)
void removeListener(@NonNull FocusGestureListener listener)

Added in version 6.7.0

Removes a previously added listener from this gesture.

In case the listener is not currently observing this instance, calling this method has no effect.

toJson()
@NonNull String toJson()

Added in version 6.7.0

Returns the JSON representation of the focus gesture.

showUIIndicator
boolean getShowUIIndicator()
void setShowUIIndicator(boolean value)

Added in version 6.19.0

If enabled triggering the focus gesture will also show a visual indicator. Defaults to true.

TapToFocus
class TapToFocus : FocusGesture

Added in version 6.6.0

Tap to focus gesture.

TapToFocus()
TapToFocus()

Added in version 6.6.0

Constructs a new TapToFocus instance. The focus strategy can be changed in the CameraSettings through focusGestureStrategy.

triggerFocus(point)
void triggerFocus(@NonNull PointWithUnit point)

Added in version 6.7.0

Implemented from FocusGesture. See FocusGesture.triggerFocus().

addListener(listener)
void addListener(@NonNull FocusGestureListener listener)

Added in version 6.7.0

Implemented from FocusGesture. See FocusGesture.addListener().

removeListener(listener)
void removeListener(@NonNull FocusGestureListener listener)

Added in version 6.7.0

Implemented from FocusGesture. See FocusGesture.removeListener().

toJson()
@NonNull String toJson()

Added in version 6.7.0

Implemented from FocusGesture. See FocusGesture.toJson().

showUIIndicator
boolean getShowUIIndicator()
void setShowUIIndicator(boolean value)

Added in version 6.19.0

If enabled triggering the focus gesture will also show a visual indicator. Defaults to true.