Barcode Count View
Defined under the namespace Scandit.Datacapture.Barcode.Count.Ui
- BarcodeCountViewStyle
Added in version 6.24.0
The style of the BarcodeCountView
- Icon
Added in version 6.24.0
Style that draws the highlights as icons and adds an animation for when a code newly appears.
- Dot
Added in version 6.24.0
Style that draws the highlights as a dot and adds an animation for when a code newly appears.
- BarcodeCountView
class BarcodeCountView
Added in version 6.24.0
BarcodeCount comes with a ready-to-use UI. Add BarcodeCountView to the view hierarchy. Please note that this view should be presented full screen.
- forContextWithMode(context, barcodeCount)
static forContextWithMode(context: DataCaptureContext, barcodeCount: BarcodeCount): BarcodeCountView
Added in version 6.24.0
Constructs a new barcode count view.
- forContextWithModeAndStyle(context, barcodeCount, style)
static forContextWithModeAndStyle(context: DataCaptureContext, barcodeCount: BarcodeCount, style: BarcodeCountViewStyle): BarcodeCountView
Added in version 6.24.0
Constructs a new barcode count view.
- shouldShowUserGuidanceView
shouldShowUserGuidanceView: boolean
Added in version 6.24.0
When set to true, user guidance and the loading view will be shown to the user. The user guidance prompts the user to scan, and to move closer or further away from the target barcodes in order to scan them properly.
By default this property is true.
- shouldShowListProgressBar
shouldShowListProgressBar: boolean
Added in version 6.25.0
When set to true, a progress bar will be shown to the user when a capture list has been set using BarcodeCount.setBarcodeCountCaptureList(), indicating how many of the barcodes in the list have been scanned.
By default this property is true.
- shouldShowListButton
shouldShowListButton: boolean
Added in version 6.24.0
When set to true, a list button will be shown to the user in the lower left hand corner of the screen. When tapped, this button will freeze the mode. This button triggers a call to BarcodeCountViewUiListener.didTapListButton().
By default this property is true.
- shouldShowExitButton
shouldShowExitButton: boolean
Added in version 6.24.0
When set to true, an exit button will be shown in the lower right hand corner of the screen. The behavior for this button is left entirely to the developer, and does nothing by default. When clicked, this button triggers a call to BarcodeCountViewUiListener.didTapExitButton().
By default this property is true.
- shouldShowShutterButton
shouldShowShutterButton: boolean
Added in version 6.24.0
When set to true, a shutter button will be shown to the user centered in the bottom of the screen. This button triggers the processing of the current video feed. The same functionality can be triggered by calling BarcodeCount.startScanningPhase().
By default this property is true.
- shouldShowHints
shouldShowHints: boolean
Added in version 6.24.0
When set to true, this view will show some messages about currently scanned barcodes.
By default this property is true.
- shouldShowClearHighlightsButton
shouldShowClearHighlightsButton: boolean
Added in version 6.24.0
When set to true, a button will be shown above the default shutter button. This button clears all currently shown barcodes highlights. The same functionality can be triggered by calling clearHighlights().
By default this property is false.
- shouldShowSingleScanButton
shouldShowSingleScanButton: boolean
Added in version 6.24.0
When set to true, a button will be shown to the user in the lower left corner of the preview. The behavior for this button is left entirely to the developer, and does nothing by default. When clicked, this button triggers a call to BarcodeCountViewUiListener.didTapSingleScanButton().
By default this property is false.
- shouldShowFloatingShutterButton
shouldShowFloatingShutterButton: boolean
Added in version 6.24.0
When set to true, a floating shutter button will be visible on screen. This button can be dragged to any position and, when tapped, will trigger the processing of the current video feed.
By default this property is false.
- shouldShowToolbar
shouldShowToolbar: boolean
Added in version 6.24.0
When set to true, a collapsable toolbar will be visible at the top of the preview. This toolbar contains a set of convenience buttons for easy preference setting during scanning.
By default this property is true.
- setToolbarSettings(settings)
setToolbarSettings(settings: BarcodeCountToolbarSettings):
void
Added in version 6.24.0
Pass an instance of BarcodeCountToolbarSettings to configure the text and accessibility options for the toolbar.
- listener
listener: BarcodeCountViewListener | null
Added in version 6.24.0
The listener which is called whenever a new TrackedBarcode is newly tracked or newly recognized.
Note
Using this listener requires the MatrixScan AR add-on.
- uiListener
uiListener: BarcodeCountViewUiListener | null
Added in version 6.24.0
The listener which is called whenever the exit or list button of the view did receive a tap.
Note
Using this listener requires the MatrixScan AR add-on.
- defaultRecognizedBrush
static get defaultRecognizedBrush(): Brush
Added in version 6.24.0
Returns the default brush to use for a recognized barcode. When setting a BarcodeCountCaptureList to the mode, this brush will be used for recognized barcodes that are part of the target list. Only used when setting the view style to BarcodeCountViewStyle.Dot.
- defaultUnrecognizedBrush
static get defaultUnrecognizedBrush(): Brush
Added in version 6.24.0
Returns the default brush to use for an unrecognized barcode. Only used when setting the view style to BarcodeCountViewStyle.Dot.
- defaultNotInListBrush
static get defaultNotInListBrush(): Brush
Added in version 6.24.0
Returns the default brush to use for a recognized barcode that’s not part of the target BarcodeCountCaptureList. Only used when setting the view style to BarcodeCountViewStyle.Dot.
- recognizedBrush
recognizedBrush: Brush | null
Added in version 6.24.0
The brush applied to recognized tracked barcodes if BarcodeCountViewListener is not implemented. When setting a BarcodeCountCaptureList to the mode, this brush will be used for recognized barcodes that are part of the target list. Setting this brush to null hides all tracked barcodes.
Used only when the view uses the BarcodeCountViewStyle.Dot style.
- unrecognizedBrush
unrecognizedBrush: Brush | null
Added in version 6.24.0
The brush applied to unrecognized tracked barcodes if BarcodeCountViewListener is not implemented. Setting this brush to null hides all tracked barcodes.
Used only when the view uses the BarcodeCountViewStyle.Dot style.
- notInListBrush
notInListBrush: Brush | null
Added in version 6.24.0
The brush applied to recognized tracked barcodes that are not part of the target BarcodeCountCaptureList, and only if BarcodeCountViewListener is not implemented. When BarcodeCountCaptureList is not set, this method will never be called. Setting this brush to null hides all tracked barcodes.
Used only when the view uses the BarcodeCountViewStyle.Dot style.
- shouldShowScanAreaGuides
shouldShowScanAreaGuides: boolean
Added in version 6.24.0
When set to true, this view will visualize the active scan area used for BarcodeCount. 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.
- style
get style(): BarcodeCountViewStyle
Added in version 6.24.0
The view style. Defaults to BarcodeCountViewStyle.Dot.
- listButtonAccessibilityLabel
listButtonAccessibilityLabel: string
Added in version 6.24.0
Use this property to access or modify the accessibility label for the list button provided by the view.
This property has effect only when running on iOS.
- exitButtonAccessibilityLabel
exitButtonAccessibilityLabel: string
Added in version 6.24.0
Use this property to access or modify the accessibility label for the exit button provided by the view.
This property has effect only when running on iOS.
- shutterButtonAccessibilityLabel
shutterButtonAccessibilityLabel: string
Added in version 6.24.0
Use this property to access or modify the accessibility label for the shutter button provided by the view.
This property has effect only when running on iOS.
- floatingShutterButtonAccessibilityLabel
floatingShutterButtonAccessibilityLabel: string
Added in version 6.24.0
Use this property to access or modify the accessibility label for the floating shutter button provided by the view.
This property has effect only when running on iOS.
- singleScanButtonAccessibilityLabel
singleScanButtonAccessibilityLabel: string
Added in version 6.24.0
Use this property to access or modify the accessibility label for the single scan button provided by the view.
This property has effect only when running on iOS.
- clearHighlightsButtonAccessibilityLabel
clearHighlightsButtonAccessibilityLabel: string
Added in version 6.24.0
Use this property to access or modify the accessibility label for the clear highlights button provided by the view.
- listButtonAccessibilityHint
listButtonAccessibilityHint: string
Added in version 6.24.0
Use this property to access or modify the accessibility hint for the list button provided by the view.
- exitButtonAccessibilityHint
exitButtonAccessibilityHint: string
Added in version 6.24.0
Use this property to access or modify the accessibility hint for the exit button provided by the view.
- shutterButtonAccessibilityHint
shutterButtonAccessibilityHint: string
Added in version 6.24.0
Use this property to access or modify the accessibility hint for the shutter button provided by the view.
- floatingShutterButtonAccessibilityHint
floatingShutterButtonAccessibilityHint: string
Added in version 6.24.0
Use this property to access or modify the accessibility hint for the floating shutter button provided by the view.
- clearHighlightsButtonAccessibilityHint
clearHighlightsButtonAccessibilityHint: string
Added in version 6.24.0
Use this property to access or modify the accessibility hint for the clear highlights button provided by the view.
- singleScanButtonAccessibilityHint
singleScanButtonAccessibilityHint: string
Added in version 6.24.0
Use this property to access or modify the accessibility hint for the single scan button provided by the view.
- clearHighlightsButtonText
clearHighlightsButtonText: string
Added in version 6.24.0
Use this property to access or modify the text of the clear button label provided by the view.
- listButtonContentDescription
listButtonContentDescription: string
Added in version 6.24.0
Use this property to access or modify the content description of the list button provided by the view.
- exitButtonContentDescription
exitButtonContentDescription: string
Added in version 6.24.0
Use this property to access or modify the content description of the exit button provided by the view.
- shutterButtonContentDescription
shutterButtonContentDescription: string
Added in version 6.24.0
Use this property to access or modify the content description of the shutter button provided by the view.
- clearHighlightsButtonContentDescription
clearHighlightsButtonContentDescription: string
Added in version 6.24.0
Use this property to access or modify the content description of the “clear highlights” button provided by the view.
- singleScanButtonContentDescription
singleScanButtonContentDescription: string
Added in version 6.24.0
Use this property to access or modify the content description of the “single scan” button provided by the view.
- floatingShutterButtonContentDescription
floatingShutterButtonContentDescription: string
Added in version 6.24.0
Use this property to access or modify the content description for the floating shutter button provided by the view.
- textForUnrecognizedBarcodesDetectedHint
textForUnrecognizedBarcodesDetectedHint: string
Added in version 6.24.0
Use this property to access or modify the text of the hint displayed when one or more unrecognized barcodes are detected.
- textForTapShutterToScanHint
textForTapShutterToScanHint: string
Added in version 6.24.0
Use this property to access or modify the text of the hint which suggests to tap the shutter button.
- textForScanningHint
textForScanningHint: string
Added in version 6.24.0
Use this property to access or modify the text of the hint displayed while scanning is in progress.
- textForMoveCloserAndRescanHint
textForMoveCloserAndRescanHint: string
Added in version 6.24.0
Use this property to access or modify the text of the hint displayed when camera should be moved closer to rescan.
- textForMoveFurtherAndRescanHint
textForMoveFurtherAndRescanHint: string
Added in version 6.24.0
Use this property to access or modify the text of the hint displayed when camera should be further away to rescan.
- exitButtonText
exitButtonText: string
Added in version 6.24.0
Use this property to access or modify the text of the exit button label provided by the view.
- filterSettings
filterSettings: BarcodeFilterHighlightSettings | null
Added in version 6.24.0
Use this property to access or modify the current view settings for barcode filtering.
- clearHighlights()
clearHighlights(): Promise<
void
>Added in version 6.24.0
Clear all currently shown barcodes highlights. This only affects screen rendering, and all detected barcodes will still be available in the BarcodeCountSession.
- connectToElement(element)
connectToElement(element: HTMLElement):
void
Added in version 6.24.0
Connect the data capture view to a given HTML element, so it’s size and position can be mirrored.
To position the barcode count view below the WebView and show content over the camera preview, change the z-index of the element to be less than 0. If you do this, make sure that the background of your HTML page is transparent, so the barcode count view positioned under the WebView can be seen.
Note
Should not be used together with setFrame(). One strategy to size the capture view should be chosen.
- detachFromElement()
detachFromElement():
void
Added in version 6.24.0
Detach the barcode count view from the currently connected HTML element. This releases the HTML element and removes any listeners or resources related to it.
- setFrame(frame, isUnderContent)
setFrame(frame: Rect, isUnderContent: boolean): Promise<
void
>Added in version 6.24.0
Manually set a specific size and position for the barcode count view.
To position the barcode count view below the WebView and show content over the camera preview, set the isUnderContent argument to true. If you do this, make sure that the background of your HTML page is transparent, so the barcode count view positioned under the WebView can be seen.
Note
Should not be used together with connectToElement(). One strategy to size the capture view should be chosen.
- show()
show(): Promise<
void
>Added in version 6.24.0
Set the view to be visible.
Should only be used with setFrame().
- hide()
hide(): Promise<
void
>Added in version 6.24.0
Set the view not to be visible.
Should only be used with setFrame().
- shouldShowTorchControl
shouldShowTorchControl: boolean
Added in version 6.26.0
Indicates whether the torch control button should be shown to the user.
Default is false.
- torchControlPosition
torchControlPosition: Anchor
Added in version 6.26.0
Updates the position of the torch control button.
Only Anchor.TopLeft, Anchor.TopRight, Anchor.BottomLeft and Anchor.BottomRight, are supported.
Any other value will default to Anchor.TopLeft.