Barcode Sequence Scan Area Restriction Settings

Defined in package com.scandit.datacapture.barcode.sequence.ui

BarcodeSequenceScanAreaRestrictionSettings
class BarcodeSequenceScanAreaRestrictionSettings

Added in version 8.5.4

Settings for the scanning restriction area of BarcodeSequenceView: a horizontal band across the full width of the preview that limits sequencing to one shelf row.

Only barcodes inside the band are decoded and added to the sequence; barcodes outside it are ignored. The band is centred vertically and spans the full preview width, so only its height is configurable.

The view writes enabled and height back into the settings object when the user changes them on screen, so they can be read back and persisted across sessions. A drag writes the height back in the unit it was set in, so a fraction stays a fraction.

BarcodeSequenceView.scanAreaRestrictionSettings defaults to null and the feature is off until a settings object is assigned.

BarcodeSequenceScanAreaRestrictionSettings()
BarcodeSequenceScanAreaRestrictionSettings()

Added in version 8.5.4

Constructs a new settings object for the scanning restriction area, with the restriction area disabled and the band at its default height.

enabled
var enabled: Boolean

Added in version 8.5.4

Indicates whether the restriction area is active. While active, the band restricts scanning and is drawn together with its delimiter lines and the dimming outside them.

Independent of toggleable, which only decides whether the user is offered a button to flip this.

Default is false.

adjustable
var adjustable: Boolean

Added in version 8.5.4

Indicates whether drag handles are shown so the user can resize the band. Dragging either handle expands or restricts the band evenly in both directions, keeping it centred. The band cannot be resized while capture is running.

Default is true.

toggleable
var toggleable: Boolean

Added in version 8.5.4

Indicates whether a button is shown that lets the user turn the restriction area on and off. When disabled, the band is governed entirely by enabled.

The button sits in the bottom right corner of the preview, on the right in a right-to-left layout too, so that it stays beside the capture bar. A control anchored to the same corner, such as the torch control with BarcodeSequenceView.torchControlPosition set to bottom right, overlaps it; anchor such controls elsewhere.

Default is true.

height
var height: FloatWithUnit

Added in version 8.5.4

Height of the band, expressed as a fraction of the preview height or in points.

Values that resolve below the minimum are raised to it, so the drag handles keep a usable touch target.

The minimum for Android is 48 dip.

Default is 0.3 of the preview height.

handleColor
var handleColor: Int

Added in version 8.5.4

Color of the delimiter lines and the drag handles.

Default is #FFFFFF.

dimmingColor
var dimmingColor: Int

Added in version 8.5.4

Color applied to the area outside the band while the restriction area is active.

Default is #00000080.