Label Capture Basic Overlay Listener
Defined in package com.scandit.datacapture.label.ui.overlay
- LabelCaptureBasicOverlayListener
interface LabelCaptureBasicOverlayListener
Added in version 6.0.0
LabelCaptureBasicOverlayListener can be implemented to customize the visual appearance of highlighted labels and their fields. When label capture identifies a new field, or when the LabelField.state property changes, brushForField() is called to determine the brush of the field.
- brushForField(overlay, field, label)
@Nullable Brush brushForField(@NonNull LabelCaptureBasicOverlay overlay, @NonNull LabelField field, @NonNull CapturedLabel label)
Added in version 6.0.0
Called for each field to determine its brush whenever the field’s state changes. In case the field is tracked over multiple frames and its state does not change, the same brush is used. The field brush can be changed by explicit calls to LabelCaptureBasicOverlay.setBrushForField().
- brushForLabel(overlay, label)
@Nullable Brush brushForLabel(@NonNull LabelCaptureBasicOverlay overlay, @NonNull CapturedLabel label)
Added in version 6.0.0
Called for each label to determine its brush whenever one of the label’s fields changes it’s state/data. In case the field is tracked over multiple frames and none of the fields changes its state, the same brush is used. The label brush can be changed by explicit calls to LabelCaptureBasicOverlay.setBrushForLabel().
- onLabelTapped(overlay, label)
void
onLabelTapped(@NonNull LabelCaptureBasicOverlay overlay, @NonNull CapturedLabel label)Added in version 6.4.0
Called every time a captured label is tapped. Called from the main thread.