Barcode Selection Basic Overlay#

Defined in package com.scandit.datacapture.barcode.selection.ui.overlay

BarcodeSelectionBasicOverlayStyle#

Added in version 6.10.0

The style of the BarcodeSelectionBasicOverlay.

FRAME#

Added in version 6.10.0

Style that draws the highlights as a rectangular frame and adds an animation for when a code newly appears.

DOT#

Added in version 6.10.0

Style that draws the highlights as a dot and adds an animation for when a code newly appears.

BarcodeSelectionBasicOverlay#
class BarcodeSelectionBasicOverlay : DataCaptureOverlay

Added in version 6.9.0

An overlay for DataCaptureView that shows a simple augmentation over each selected barcode.

To display the augmentations, this overlay must be attached to a DataCaptureView. This may be done either by creating it with newInstance() with a non-null view parameter or by passing this overlay to DataCaptureView.addOverlay().

A user of this class may configure the appearance of the augmentations by configuring the brush properties.

newInstance(barcodeSelection, view)#
static @NonNull BarcodeSelectionBasicOverlay newInstance(
        @NonNull BarcodeSelection barcodeSelection,
        @Nullable DataCaptureView view)

Added in version 6.9.0

Constructs a new barcode selection basic overlay for the barcode selection instance. The overlay is automatically added to the view.

newInstance(barcodeSelection, view, style)
static @NonNull BarcodeSelectionBasicOverlay newInstance(
        @NonNull BarcodeSelection barcodeSelection,
        @Nullable DataCaptureView view,
        BarcodeSelectionBasicOverlayStyle style)

Added in version 6.10.0

Constructs a new barcode selection basic overlay for the barcode selection instance with the specified style. The overlay is automatically added to the view.

fromJson(mode, jsonData)#
static @NonNull BarcodeSelectionBasicOverlay fromJson(
        @NonNull BarcodeSelection mode,
        @NonNull String jsonData)

Added in version 6.10.0

Constructs a new barcode selection basic overlay with the provided JSON serialization. See Serialization for details.

For the overlay to be displayed on screen, it must be added to a DataCaptureView.

DEFAULT_TRACKED_BRUSH#
static final @NonNull Brush DEFAULT_TRACKED_BRUSH

Added in version 6.9.0

The default brush applied to recognized tracked barcodes.

Deprecated since version 6.10.1: The defaultTrackedBrush of the overlay depends on the style used, there is no unique default brush. Use defaultTrackedBrush() instead.

defaultTrackedBrush(style)#
static Brush defaultTrackedBrush(BarcodeSelectionBasicOverlayStyle style)

Added in version 6.10.1

Returns the default tracked brush for the given style.

DEFAULT_AIMED_BRUSH#
static final @NonNull Brush DEFAULT_AIMED_BRUSH

Added in version 6.9.0

The default brush applied to aimed barcodes.

Deprecated since version 6.10.1: The defaultAimedBrush of the overlay depends on the style used, there is no unique default brush. Use defaultAimedBrush() instead.

defaultAimedBrush(style)#
static Brush defaultAimedBrush(BarcodeSelectionBasicOverlayStyle style)

Added in version 6.10.1

Returns the default aimed brush for the given style.

DEFAULT_SELECTED_BRUSH#
static final @NonNull Brush DEFAULT_SELECTED_BRUSH

Added in version 6.9.0

The default brush applied to selected barcodes.

Deprecated since version 6.10.1: The defaultSelectedBrush of the overlay depends on the style used, there is no unique default brush. Use defaultSelectedBrush() instead.

defaultSelectedBrush(style)#
static Brush defaultSelectedBrush(BarcodeSelectionBasicOverlayStyle style)

Added in version 6.10.1

Returns the default selected brush for the given style.

DEFAULT_SELECTING_BRUSH#
static final @NonNull Brush DEFAULT_SELECTING_BRUSH

Added in version 6.9.0

The default brush applied to barcodes currently being selected.

Deprecated since version 6.10.1: The defaultSelectingBrush of the overlay depends on the style used, there is no unique default brush. Use defaultSelectingBrush() instead.

defaultSelectingBrush(style)#
static Brush defaultSelectingBrush(BarcodeSelectionBasicOverlayStyle style)

Added in version 6.10.1

Returns the default selecting brush for the given style.

trackedBrush#
@NonNull Brush getTrackedBrush()
void setTrackedBrush(@NonNull Brush value)

Added in version 6.9.0

The brush applied to recognized tracked barcodes, by default the value is set to DEFAULT_TRACKED_BRUSH. Setting this brush to Brush.transparent() hides all tracked barcodes.

aimedBrush#
@NonNull Brush getAimedBrush()
void setAimedBrush(@NonNull Brush value)

Added in version 6.9.0

The brush applied to the barcode that is currently being aimed at.

By default the value is set to DEFAULT_AIMED_BRUSH.

selectedBrush#
@NonNull Brush getSelectedBrush()
void setSelectedBrush(@NonNull Brush value)

Added in version 6.9.0

The brush applied to selected barcodes, by default the value is set to DEFAULT_SELECTED_BRUSH. Setting this brush to Brush.transparent() hides all selected barcodes.

selectingBrush#
@NonNull Brush getSelectingBrush()
void setSelectingBrush(@NonNull Brush value)

Added in version 6.9.0

The brush applied to the barcodes for the short moment when they are being selected.

By default the value is set to DEFAULT_SELECTING_BRUSH.

shouldShowScanAreaGuides#
boolean getShouldShowScanAreaGuides()
void setShouldShowScanAreaGuides(boolean value)

Added in version 6.9.0

When set to true, this overlay will visualize the active scan area used for BarcodeSelection. This is useful to check margins defined on the DataCaptureView are set correctly. This property is meant for debugging during development and is not intended for use in production.

By default this property is false.

shouldShowHints#
boolean getShouldShowHints()
void setShouldShowHints(boolean value)

Added in version 6.9.0

When set to true, this overlay will visualize some hints explaining how to use barcode selection.

By default this property is true.

viewfinder#
@NonNull Viewfinder getViewfinder()

Added in version 6.9.0

The viewfinder of the overlay. The viewfinder is only visible when the selection type is BarcodeSelectionAimerSelection.

clearSelectedBarcodeBrushes()#
void clearSelectedBarcodeBrushes()

Added in version 6.9.0

Clears all currently displayed visualizations for the on screen barcodes.

This only applies to the currently displayed barcodes, the visualizations for the new ones will still appear.

updateFromJson(jsonData)#
void updateFromJson(@NonNull String jsonData)

Added in version 6.10.0

Updates the overlay according to a JSON serialization. See Serialization for details.

frozenBackgroundColor#
int getFrozenBackgroundColor()
void setFrozenBackgroundColor(int value)

Added in version 6.12.0

The overlay’s background color when in frozen state. This color will be on top of the video preview but below the highlights. Semitransparent black by default.

style#
BarcodeSelectionBasicOverlayStyle getStyle()

Added in version 6.10.0

The overlay style. Defaults to Frame.