Barcode Check View
Defined in package com.scandit.datacapture.barcode.check.ui
- BarcodeCheckViewUiListener
interface BarcodeCheckViewUiListener
Added in version 7.1.0
- onHighlightForBarcodeTapped(barcodeCheck, barcode, highlight, highlightView)
void
onHighlightForBarcodeTapped(@NonNull BarcodeCheck barcodeCheck, @NonNull Barcode barcode, @NonNull BarcodeCheckHighlight highlight, @NonNull View highlightView)Added in version 7.1.0
Callback method that is called when a barcode highlight is tapped in the view.
- BarcodeCheckView
class BarcodeCheckView : FrameLayout
Added in version 7.1.0
BarcodeCheck comes with a ready-to-use UI that allows highlighting barcodes and displaying additional information over them. The BarcodeCheckView integrates with any app in just a few lines of code.
- BarcodeCheckView()
BarcodeCheckView(@NonNull ViewGroup parentView, @NonNull BarcodeCheck barcodeCheck, @NonNull DataCaptureContext dataCaptureContext, @Nullable BarcodeCheckViewSettings settings, @Nullable CameraSettings cameraSettings)
Added in version 7.1.0
Creates a new BarcodeCheckView with the provided mode, viewSettings and cameraSettings.
- BarcodeCheckView()
BarcodeCheckView(@NonNull ViewGroup parentView, @NonNull BarcodeCheck barcodeCheck, @NonNull DataCaptureContext dataCaptureContext, @Nullable BarcodeCheckViewSettings settings)
Added in version 7.1.0
Creates a new BarcodeCheckView with the provided mode, viewSettings and default camera settings from BarcodeCheck.createRecommendedCameraSettings(). This is equivalent of calling BarcodeCheckView() with null cameraSettings.
- uiListener
@Nullable BarcodeCheckViewUiListener getUiListener()
void
setUiListener(@Nullable BarcodeCheckViewUiListener value)Added in version 7.1.0
Sets the listener which is called whenever a barcode highlight is tapped in the view.
- highlightProvider
@Nullable BarcodeCheckHighlightProvider getHighlightProvider()
void
setHighlightProvider(@Nullable BarcodeCheckHighlightProvider value)Added in version 7.1.0
Sets the provider which supplies highlight information for barcodes in the view. If null, a default provider is used, which returns a predefined highlight for each barcode.
- annotationProvider
@Nullable BarcodeCheckAnnotationProvider getAnnotationProvider()
void
setAnnotationProvider(@Nullable BarcodeCheckAnnotationProvider value)Added in version 7.1.0
Sets the provider which supplies annotation information for barcodes in the view. If null, no annotation will be displayed for any barcode.
- shouldShowTorchControl
boolean
getShouldShowTorchControl()void
setShouldShowTorchControl(boolean
value)Added in version 7.1.0
Indicates whether the torch control button should be shown to the user.
Default is false.
- torchControlPosition
Anchor getTorchControlPosition()
void
setTorchControlPosition(Anchor value)Added in version 7.1.0
Updates the position of the torch control button.
Default is Anchor.TOP_LEFT.
- shouldShowZoomControl
boolean
getShouldShowZoomControl()void
setShouldShowZoomControl(boolean
value)Added in version 7.1.0
Indicates whether the zoom control button should be shown to the user.
- zoomControlPosition
Anchor getZoomControlPosition()
void
setZoomControlPosition(Anchor value)Added in version 7.1.0
Updates the position of the zoom control button.
Default is Anchor.BOTTOM_RIGHT.
- shouldShowCameraSwitchControl
boolean
getShouldShowCameraSwitchControl()void
setShouldShowCameraSwitchControl(boolean
value)Added in version 7.1.0
Indicates whether the camera switch control button should be shown to the user.
- cameraSwitchControlPosition
Anchor getCameraSwitchControlPosition()
void
setCameraSwitchControlPosition(Anchor value)Added in version 7.1.0
Updates the position of the camera switch control button.
Default is Anchor.TOP_RIGHT.
- start()
void
start()Added in version 7.1.0
Starts the scanning process.
The scanning process will actually start only if the lifecycle state is resumed, which can be done by calling onResume().
- stop()
void
stop()Added in version 7.1.0
Stops the scanning process.
- onPause()
void
onPause()Added in version 7.1.0
Function to call on Fragment/Activity onPause callback. This will set the BarcodeCheckView’s lifecycle state to Paused. Scanning only happens when the BarcodeCheckView is in Resumed state. You have to call this for the correct functioning of the BarcodeCheckView.
override fun onPause() { super.onPause() barcodeCheckView.onPause() }
- onResume()
void
onResume()Added in version 7.1.0
Function to call on Fragment/Activity onResume callback. This will set the BarcodeCheckView’s lifecycle state to Resumed. Scanning only happens when the BarcodeCheckView is in Resumed state. You have to call this for the correct functioning of the BarcodeCheckView.
override fun onResume() { super.onResume() barcodeCheckView.onResume() }
- onDestroy()
void
onDestroy()Added in version 7.1.0
Function to call on Fragment/Activity onDestroyView callback. This will set the BarcodeCheckView’s lifecycle state to Destroyed. Scanning only happens when the BarcodeCheckView is in Resumed state. You have to call this for the correct functioning of the BarcodeCheckView.
override fun onDestroyView() { super.onDestroyView() barcodeCheckView.onDestroy() }
- reset()
void
reset()Added in version 7.1.0
Clears all highlights and annotations currently visible and calls highlightProvider and annotationProvider to supply new highlights and annotations.