Barcode Count View
Defined in package com.scandit.datacapture.barcode.count.ui
- BarcodeCountViewStyle
Added in version 8.6.0
The style of the BarcodeCountView
- ICON
Added in version 8.6.0
Style that draws the highlights as icons and adds an animation for when a code newly appears.
- DOT
Added in version 8.6.0
Style that draws the highlights as a dot and adds an animation for when a code newly appears.
- BarcodeCountView
class BarcodeCountViewAdded in version 8.6.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.
- addListener(listener)
fun addListener(listener: BarcodeCountViewUiListener)
Added in version 8.6.0
Adds a UI listener to be notified of taps on the view’s built-in buttons. On KMP the view supports multiple registered listeners.
- removeListener(listener)
fun removeListener(listener: BarcodeCountViewUiListener)
Added in version 8.6.0
Removes a previously added listener.
- onResume()
fun onResume()Added in version 8.6.0
Lifecycle hook to be called when the hosting screen resumes.
- onPause()
fun onPause()Added in version 8.6.0
Lifecycle hook to be called when the hosting screen pauses.
- shouldShowUserGuidanceView
var shouldShowUserGuidanceView:
BooleanAdded in version 8.6.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
var shouldShowListProgressBar:
BooleanAdded in version 8.6.0
When set to true, a progress bar will be shown to the user when a capture list has been set, indicating how many of the barcodes in the list have been scanned.
By default this property is true.
- shouldShowListButton
var shouldShowListButton:
BooleanAdded in version 8.6.0
By default this property is true.
- shouldShowExitButton
var shouldShowExitButton:
BooleanAdded in version 8.6.0
By default this property is true.
- shouldShowShutterButton
var shouldShowShutterButton:
BooleanAdded in version 8.6.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
var shouldShowHints:
BooleanAdded in version 8.6.0
When set to true, this view will show some messages about currently scanned barcodes.
By default this property is true.
- shouldShowClearHighlightsButton
var shouldShowClearHighlightsButton:
BooleanAdded in version 8.6.0
When set to true, a button will be shown above the default shutter button. This button clears all currently shown barcodes highlights.
- shouldShowSingleScanButton
var shouldShowSingleScanButton:
BooleanAdded in version 8.6.0
By default this property is false.
- shouldShowStatusModeButton
var shouldShowStatusModeButton:
BooleanAdded in version 8.6.0
When set to true, a button will be shown to the user in the lower right corner of the preview. This button toggles “status mode”, in which the normal barcode highlights will be replaced by status indicators for each barcode.
- shouldShowFloatingShutterButton
var shouldShowFloatingShutterButton:
BooleanAdded in version 8.6.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
var shouldShowToolbar:
BooleanAdded in version 8.6.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.
- shouldDisableModeOnExitButtonTapped
var shouldDisableModeOnExitButtonTapped:
BooleanAdded in version 8.6.0
When set to true, the mode will disable automatically when the default exit button is tapped.
By default this property is true.
- setToolbarSettings(settings)
fun setToolbarSettings(settings: BarcodeCountToolbarSettings)
Added in version 8.6.0
Pass an instance of BarcodeCountToolbarSettings to configure the text and accessibility options for the toolbar.
- setStatusProvider(provider)
fun setStatusProvider(provider: BarcodeCountStatusProvider)
Added in version 8.6.0
Sets a BarcodeCountStatusProvider for this view. This provider will be queried when the “status mode” button is clicked.
Note
The Barcode Count status mode API is still in beta and may change in future versions of Scandit Data Capture SDK.
- listener
var listener: BarcodeCountViewListener?
Added in version 8.6.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.
- defaultRecognizedBrush()
fun BarcodeCountView.defaultRecognizedBrush(): Brush
Added in version 8.6.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.
- defaultNotInListBrush()
fun BarcodeCountView.defaultNotInListBrush(): Brush
Added in version 8.6.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.
- defaultAcceptedBrush()
fun BarcodeCountView.defaultAcceptedBrush(): Brush
Added in version 8.6.0
Returns the default brush to use for accepted barcodes. Only used when setting the view style to BarcodeCountViewStyle.DOT.
- defaultRejectedBrush()
fun BarcodeCountView.defaultRejectedBrush(): Brush
Added in version 8.6.0
Returns the default brush to use for rejected barcodes. Only used when setting the view style to BarcodeCountViewStyle.DOT.
- defaultRecognizedIcon()
fun BarcodeCountView.defaultRecognizedIcon(): BarcodeCountIcon
Added in version 8.6.0
Returns the default BarcodeCountIcon used for a recognized barcode. When setting a BarcodeCountCaptureList to the mode, this icon will be used for recognized barcodes that are part of the target list. Only used when the view style is BarcodeCountViewStyle.ICON.
- defaultNotInListIcon()
fun BarcodeCountView.defaultNotInListIcon(): BarcodeCountIcon
Added in version 8.6.0
Returns the default BarcodeCountIcon used for a recognized barcode that’s not part of the target BarcodeCountCaptureList. Only used when the view style is BarcodeCountViewStyle.ICON.
- defaultAcceptedIcon()
fun BarcodeCountView.defaultAcceptedIcon(): BarcodeCountIcon
Added in version 8.6.0
Returns the default BarcodeCountIcon used for an accepted barcode. Used regardless of the view style.
- defaultRejectedIcon()
fun BarcodeCountView.defaultRejectedIcon(): BarcodeCountIcon
Added in version 8.6.0
Returns the default BarcodeCountIcon used for a rejected barcode. Used regardless of the view style.
- recognizedBrush
var recognizedBrush: Brush?
Added in version 8.6.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.
Defaults to a yellow-colored Brush.
Used only when the view uses the BarcodeCountViewStyle.DOT style.
- notInListBrush
var notInListBrush: Brush?
Added in version 8.6.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.
Defaults to a red-colored Brush.
Used only when the view uses the BarcodeCountViewStyle.DOT style.
- acceptedBrush
var acceptedBrush: Brush?
Added in version 8.6.0
The brush applied to accepted tracked barcodes if BarcodeCountViewListener is not implemented. Setting this brush to null hides all accepted barcodes.
Defaults to a green-colored Brush.
Used only when the view uses the BarcodeCountViewStyle.DOT style.
- rejectedBrush
var rejectedBrush: Brush?
Added in version 8.6.0
The brush applied to rejected tracked barcodes if BarcodeCountViewListener is not implemented. Setting this brush to null hides all rejected barcodes.
Defaults to a red-colored Brush.
Used only when the view uses the BarcodeCountViewStyle.DOT style.
- shouldShowScanAreaGuides
var shouldShowScanAreaGuides:
BooleanAdded in version 8.6.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
val style: BarcodeCountViewStyle
Added in version 8.6.0
The view style. Defaults to BarcodeCountViewStyle.DOT.
- listButtonAccessibilityLabel
var listButtonAccessibilityLabel: String
Added in version 8.6.0
Use this property to access or modify the accessibility label for the list button provided by the view.
Default value is “List button”.
- exitButtonAccessibilityLabel
var exitButtonAccessibilityLabel: String
Added in version 8.6.0
Use this property to access or modify the accessibility label for the exit button provided by the view.
Default value is “Exit button”.
- shutterButtonAccessibilityLabel
var shutterButtonAccessibilityLabel: String
Added in version 8.6.0
Use this property to access or modify the accessibility label for the shutter button provided by the view.
Default value is “Shutter button”.
- floatingShutterButtonAccessibilityLabel
var floatingShutterButtonAccessibilityLabel: String
Added in version 8.6.0
Use this property to access or modify the accessibility label for the floating shutter button provided by the view.
Default value is “Floating shutter button”.
- singleScanButtonAccessibilityLabel
var singleScanButtonAccessibilityLabel: String
Added in version 8.6.0
Use this property to access or modify the accessibility label for the single scan button provided by the view.
Default value is “Single scan button”.
- clearHighlightsButtonAccessibilityLabel
var clearHighlightsButtonAccessibilityLabel: String
Added in version 8.6.0
Use this property to access or modify the accessibility label for the clear highlights button provided by the view.
Default value is “Clear highlights button”.
- statusModeButtonAccessibilityLabel
var statusModeButtonAccessibilityLabel: String
Added in version 8.6.0
Use this property to access or modify the accessibility label for the single status mode button provided by the view.
Default value is “Status mode button”.
- nextGroupButtonAccessibilityLabel
var nextGroupButtonAccessibilityLabel: String
Added in version 8.6.0
Use this property to access or modify the accessibility label for the next group button provided by the view.
Default value is “Next group button”.
- redoButtonAccessibilityLabel
var redoButtonAccessibilityLabel: String
Added in version 8.6.0
Use this property to access or modify the accessibility label for the redo button provided by the view.
Default value is “Redo button”.
- listButtonAccessibilityHint
var listButtonAccessibilityHint: String
Added in version 8.6.0
Use this property to access or modify the accessibility hint for the list button provided by the view.
Default value is “List button”.
- exitButtonAccessibilityHint
var exitButtonAccessibilityHint: String
Added in version 8.6.0
Use this property to access or modify the accessibility hint for the exit button provided by the view.
Default value is “Exit button”.
- shutterButtonAccessibilityHint
var shutterButtonAccessibilityHint: String
Added in version 8.6.0
Use this property to access or modify the accessibility hint for the shutter button provided by the view.
Default value is “Shutter button”.
- floatingShutterButtonAccessibilityHint
var floatingShutterButtonAccessibilityHint: String
Added in version 8.6.0
Use this property to access or modify the accessibility hint for the floating shutter button provided by the view.
Default value is “Floating shutter button”.
- clearHighlightsButtonAccessibilityHint
var clearHighlightsButtonAccessibilityHint: String
Added in version 8.6.0
Use this property to access or modify the accessibility hint for the clear highlights button provided by the view.
Default value is “Clear highlights button”.
- singleScanButtonAccessibilityHint
var singleScanButtonAccessibilityHint: String
Added in version 8.6.0
Use this property to access or modify the accessibility hint for the single scan button provided by the view.
Default value is “Single scan button”.
- nextGroupButtonAccessibilityHint
var nextGroupButtonAccessibilityHint: String
Added in version 8.6.0
Use this property to access or modify the accessibility hint for the next group button provided by the view.
Default value is “Next group button”.
- redoButtonAccessibilityHint
var redoButtonAccessibilityHint: String
Added in version 8.6.0
Use this property to access or modify the accessibility hint for the redo button provided by the view.
Default value is “Redo button”.
- statusModeButtonAccessibilityHint
var statusModeButtonAccessibilityHint: String
Added in version 8.6.0
Use this property to access or modify the accessibility hint for the status mode button provided by the view.
Default value is “Status mode button”.
- setClearHighlightsButtonText(text)
fun setClearHighlightsButtonText(text: String)
Added in version 8.6.0
Use this method to modify the text of the clear button label provided by the view.
- getClearHighlightsButtonText()
fun getClearHighlightsButtonText(): String
Added in version 8.6.0
Returns the text of the clear button label provided by the view.
- setTextForTapShutterToScanHint(text)
fun setTextForTapShutterToScanHint(text: String)
Added in version 8.6.0
Sets the text of the hint which suggests to tap the shutter button.
- getTextForTapShutterToScanHint()
fun getTextForTapShutterToScanHint(): String
Added in version 8.6.0
Returns the text of the hint which suggests to tap the shutter button.
- setTextForScanningHint(text)
fun setTextForScanningHint(text: String)
Added in version 8.6.0
Sets the text of the hint displayed while scanning is in progress.
- getTextForScanningHint()
fun getTextForScanningHint(): String
Added in version 8.6.0
Returns the text of the hint displayed while scanning is in progress.
- setTextForMoveCloserAndRescanHint(text)
fun setTextForMoveCloserAndRescanHint(text: String)
Added in version 8.6.0
Sets the text of the hint displayed when camera should be moved closer to rescan.
- getTextForMoveCloserAndRescanHint()
fun getTextForMoveCloserAndRescanHint(): String
Added in version 8.6.0
Returns the text of the hint displayed when camera should be moved closer to rescan.
- setTextForMoveFurtherAndRescanHint(text)
fun setTextForMoveFurtherAndRescanHint(text: String)
Added in version 8.6.0
Sets the text of the hint displayed when camera should be further away to rescan.
- getTextForMoveFurtherAndRescanHint()
fun getTextForMoveFurtherAndRescanHint(): String
Added in version 8.6.0
Returns the text of the hint displayed when camera should be further away to rescan.
- setTextForBarcodesNotInListDetectedHint(text)
fun setTextForBarcodesNotInListDetectedHint( text: String)
Added in version 8.6.0
Sets the text of the hint displayed when a barcode not in list is scanned.
- getTextForBarcodesNotInListDetectedHint()
fun getTextForBarcodesNotInListDetectedHint(): String
Added in version 8.6.0
Returns the text of the hint displayed when a barcode not in list is scanned.
- setTextForScreenCleanedUpHint(text)
fun setTextForScreenCleanedUpHint(text: String)
Added in version 8.6.0
Sets the text of the hint displayed when screen is cleaned.
- getTextForScreenCleanedUpHint()
fun getTextForScreenCleanedUpHint(): String
Added in version 8.6.0
Returns the text of the hint displayed when screen is cleaned.
- setTextForNewGroupHint(text)
fun setTextForNewGroupHint(text: String)
Added in version 8.6.0
Sets the text of the hint displayed when a new scan group starts. If the hint includes the substring “{index}”, it will be replaced with the group index, starting with 1.
- getTextForNewGroupHint()
fun getTextForNewGroupHint(): String
Added in version 8.6.0
Returns the text of the hint displayed when a new scan group starts.
- setExitButtonText(text)
fun setExitButtonText(text: String)
Added in version 8.6.0
Use this method to modify the text of the exit button label provided by the view.
- getExitButtonText()
fun getExitButtonText(): String
Added in version 8.6.0
Returns the text of the exit button label provided by the view.
- setNextGroupButtonText(text)
fun setNextGroupButtonText(text: String)
Added in version 8.6.0
Use this method to modify the text of the next group button label provided by the view.
- getNextGroupButtonText()
fun getNextGroupButtonText(): String
Added in version 8.6.0
Returns the text of the next group button label provided by the view.
- setRedoButtonText(text)
fun setRedoButtonText(text: String)
Added in version 8.6.0
Use this method to modify the text of the redo button label provided by the view.
- getRedoButtonText()
fun getRedoButtonText(): String
Added in version 8.6.0
Returns the text of the redo button label provided by the view.
- filterSettings
var filterSettings: BarcodeFilterHighlightSettings?
Added in version 8.6.0
Use this property to access or modify the current view settings for barcode filtering.
- clearHighlights()
fun clearHighlights()Added in version 8.6.0
Clear all currently shown barcodes highlights. This only affects screen rendering, and all detected barcodes will still be available in the BarcodeCountSession.
- setBrushForRecognizedBarcode(barcode, brush)
fun setBrushForRecognizedBarcode(barcode: TrackedBarcode, brush: Brush?)
Added in version 8.6.0
Sets a Brush to be used for a particular recognized TrackedBarcode. This will override any other applicable brush for this particular barcode.
Used only when the view uses the BarcodeCountViewStyle.DOT style.
- setBrushForRecognizedBarcodeNotInList(barcode, brush)
fun setBrushForRecognizedBarcodeNotInList( barcode: TrackedBarcode, brush: Brush?)
Added in version 8.6.0
Sets a Brush to be used for a particular recognized TrackedBarcode that doesn’t belong to the capture list. This will only be applicable when using a capture list, and will override any other applicable brush for this particular barcode.
Used only when the view uses the BarcodeCountViewStyle.DOT style.
- setBrushForAcceptedBarcode(barcode, brush)
fun setBrushForAcceptedBarcode(barcode: TrackedBarcode, brush: Brush?)
Added in version 8.6.0
Sets a Brush to be used for a particular accepted TrackedBarcode. This will override any other applicable brush for this particular barcode.
Used only when the view uses the BarcodeCountViewStyle.DOT style.
- setBrushForRejectedBarcode(barcode, brush)
fun setBrushForRejectedBarcode(barcode: TrackedBarcode, brush: Brush?)
Added in version 8.6.0
Sets a Brush to be used for a particular rejected TrackedBarcode. This will override any other applicable brush for this particular barcode.
Used only when the view uses the BarcodeCountViewStyle.DOT style.
- setIconForRecognizedBarcode(barcode, icon)
fun setIconForRecognizedBarcode(barcode: TrackedBarcode, icon: BarcodeCountIcon?)
Added in version 8.6.0
Sets a BarcodeCountIcon to be used for a particular recognized TrackedBarcode. This will override any other applicable icon for this particular barcode. Passing null suppresses the highlight for the given barcode.
Used only when the view uses the BarcodeCountViewStyle.ICON style.
- setIconForRecognizedBarcodeNotInList(barcode, icon)
fun setIconForRecognizedBarcodeNotInList(barcode: TrackedBarcode, icon: BarcodeCountIcon?)
Added in version 8.6.0
Sets a BarcodeCountIcon to be used for a particular recognized TrackedBarcode that doesn’t belong to the capture list. This will only be applicable when using a capture list, and will override any other applicable icon for this particular barcode. Passing null suppresses the highlight for the given barcode.
Used only when the view uses the BarcodeCountViewStyle.ICON style.
- setIconForAcceptedBarcode(barcode, icon)
fun setIconForAcceptedBarcode(barcode: TrackedBarcode, icon: BarcodeCountIcon?)
Added in version 8.6.0
Sets a BarcodeCountIcon to be used for a particular accepted TrackedBarcode. This will override any other applicable icon for this particular barcode. Passing null suppresses the highlight for the given barcode.
Used only when the view uses the BarcodeCountViewStyle.ICON style.
- setIconForRejectedBarcode(barcode, icon)
fun setIconForRejectedBarcode(barcode: TrackedBarcode, icon: BarcodeCountIcon?)
Added in version 8.6.0
Sets a BarcodeCountIcon to be used for a particular rejected TrackedBarcode. This will override any other applicable icon for this particular barcode. Passing null suppresses the highlight for the given barcode.
Used only when the view uses the BarcodeCountViewStyle.ICON style.
- enableHardwareTrigger(hardwareTriggerKeyCode)
fun enableHardwareTrigger(hardwareTriggerKeyCode: Int?)
Added in version 8.6.0
- hardwareTriggerSupported
val BarcodeCountView.hardwareTriggerSupported:
BooleanAdded in version 8.6.0
Returns whether the device supports listening for hardware button events. This is true for devices with api >= 28.
- tapToUncountEnabled
var tapToUncountEnabled:
BooleanAdded in version 8.6.0
Enables this feature to be able to deselect items by tapping on the highlights.
Default value is false.
- setTextForTapToUncountHint(text)
fun setTextForTapToUncountHint(text: String)
Added in version 8.6.0
Sets the text of the hint displayed when the user deselects an item.
- getTextForTapToUncountHint()
fun getTextForTapToUncountHint(): String
Added in version 8.6.0
Returns the text of the hint displayed when the user deselects an item.
- shouldShowTorchControl
var shouldShowTorchControl:
BooleanAdded in version 8.6.0
Indicates whether the torch control button should be shown to the user.
Default is false.
- torchControlPosition
var torchControlPosition: Anchor
Added in version 8.6.0
Updates the position of the torch control button.
Only Anchor.TOP_LEFT, Anchor.TOP_RIGHT, Anchor.BOTTOM_LEFT and Anchor.BOTTOM_RIGHT, are supported.
Any other value will default to Anchor.TOP_LEFT.
- barcodeNotInListActionSettings
var barcodeNotInListActionSettings: BarcodeCountNotInListActionSettings
Added in version 8.6.0
Use this object to customize barcode not in list actions.
- setTextForClusteringGestureHint(text)
fun setTextForClusteringGestureHint(text: String)
Added in version 8.6.0
Sets the text of the hint that suggests the user to use gestures to form clusters.
- getTextForClusteringGestureHint()
fun getTextForClusteringGestureHint(): String
Added in version 8.6.0
Gets the text of the hint that suggests the user to use gestures to form clusters.
By default this property is “Swipe or circle codes to group together.”
- shouldShowStatusIconsOnScan
var shouldShowStatusIconsOnScan:
BooleanAdded in version 8.6.0
When enabled, status icons will be loaded immediately after barcodes are scanned, without requiring manual activation of status mode.
- logoStyle
var logoStyle: LogoStyle
Added in version 8.6.0
The style of the logo, either the extended “Scanning By Scandit” or the minimal “Scandit”.
Default is LogoStyle.MINIMAL.
- logoAnchor
var logoAnchor: Anchor
Added in version 8.6.0
The anchor point used to position the Scandit logo.
Default is Anchor.BOTTOM_LEFT.