Barcode Ar Icon Annotation

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

BarcodeArInfoAnnotationWidthPreset

Added in version 7.1.0

The available width options for an info annotation.

SMALL

Added in version 7.1.0

Small width. Recommended for annotations that contain only text or icon, and do not include a header or footer.

MEDIUM

Added in version 7.1.0

Medium width.

LARGE

Added in version 7.1.0

Large width.

BarcodeArInfoAnnotationAnchor

Added in version 7.1.0

The available anchor options for an info annotation.

LEFT

Added in version 7.1.0

The annotation is anchored at its left edge.

RIGHT

Added in version 7.1.0

The annotation is anchored at its right edge.

BOTTOM

Added in version 7.1.0

The annotation is anchored at its bottom-center point.

TOP

Added in version 7.1.0

The annotation is anchored at its top-center point.

BarcodeArInfoAnnotationListener
interface BarcodeArInfoAnnotationListener

Added in version 7.1.0

The listener for the info annotation.

onInfoAnnotationHeaderTapped(annotation)
void onInfoAnnotationHeaderTapped(@NonNull BarcodeArInfoAnnotation annotation)

Added in version 7.1.0

Called when the annotation header is tapped. Called only if BarcodeArInfoAnnotation.isEntireAnnotationTappable is false.

onInfoAnnotationFooterTapped(annotation)
void onInfoAnnotationFooterTapped(@NonNull BarcodeArInfoAnnotation annotation)

Added in version 7.1.0

Called when the annotation footer is tapped. Called only if BarcodeArInfoAnnotation.isEntireAnnotationTappable is false.

onInfoAnnotationLeftIconTapped(annotation, component, componentIndex)
void onInfoAnnotationLeftIconTapped(@NonNull BarcodeArInfoAnnotation annotation,
        @NonNull BarcodeArInfoAnnotationBodyComponent component,
        int componentIndex)

Added in version 7.1.0

Called when the left icon of an annotation component is tapped. componentIndex specifies the index of the component containing the tapped icon within the BarcodeArInfoAnnotation.body array. Called only if BarcodeArInfoAnnotation.isEntireAnnotationTappable is false.

onInfoAnnotationRightIconTapped(annotation, component, componentIndex)
void onInfoAnnotationRightIconTapped(@NonNull BarcodeArInfoAnnotation annotation,
        @NonNull BarcodeArInfoAnnotationBodyComponent component,
        int componentIndex)

Added in version 7.1.0

Called when the right icon of an annotation component is tapped. componentIndex specifies the index of the component containing the tapped icon within the BarcodeArInfoAnnotation.body array. Called only if BarcodeArInfoAnnotation.isEntireAnnotationTappable is false.

onInfoAnnotationTapped(annotation)
void onInfoAnnotationTapped(@NonNull BarcodeArInfoAnnotation annotation)

Added in version 7.1.0

Called when the annotation is tapped. Called only if BarcodeArInfoAnnotation.isEntireAnnotationTappable is true.

BarcodeArInfoAnnotation
class BarcodeArInfoAnnotation : BarcodeArAnnotation

Added in version 7.1.0

Info annotations are tooltips that display text and icons, structured as an array of body components. Each body component contains text and may include optional tappable icons on both the left and right sides.

In addition to the body components, info annotations can include an optional header, and footer. By default, they appear automatically when the corresponding barcode is scanned. Info annotations are available in three predefined widths, with their height dynamically adjusting to fit the content. Here are some examples:

../../../_images/info_annotation_without_header.png ../../../_images/info_annotation_with_header.png ../../../_images/info_annotation_with_button.png

Body component only.

Body component and header.

Body component with attributed text and tappable icon.

BarcodeArInfoAnnotation()
BarcodeArInfoAnnotation(@NonNull Context context,
        @NonNull Barcode barcode)

Added in version 7.1.0

Constructs a new instance with the given barcode.

update(barcodeLocation, highlightViewLocation, view)
void update(@NonNull Quadrilateral barcodeLocation,
        @NonNull Quadrilateral highlightViewLocation,
        @NonNull View view)

Added in version 7.3.0

Called to update the view with barcode location and highlight location. Called from the main thread. This method should not be called directly, it will be invoked automatically when needed.

createView()
@NonNull View createView()

Added in version 7.3.0

Called once to get the view that will be updated with barcode location in update(). Called from the main thread.

barcode
@NonNull Barcode getBarcode()

Added in version 7.1.0

The barcode instance for the annotation.

hasTip
boolean getHasTip()
void setHasTip(boolean value)

Added in version 7.1.0

Whether the annotation has a tip. The default value is true.

isEntireAnnotationTappable
boolean isEntireAnnotationTappable()
void setEntireAnnotationTappable(boolean value)

Added in version 7.1.0

If false, each individual element within the annotation (header, footer, icons in body components) is tappable. If true, the entire annotation is tappable.

anchor
BarcodeArInfoAnnotationAnchor getAnchor()
void setAnchor(BarcodeArInfoAnnotationAnchor value)

Added in version 7.1.0

The annotation anchor. The default value is BarcodeArInfoAnnotationAnchor.BOTTOM.

annotationTrigger
BarcodeArAnnotationTrigger getAnnotationTrigger()
void setAnnotationTrigger(BarcodeArAnnotationTrigger value)

Added in version 7.1.0

The trigger that causes the annotation to be presented. By default is BarcodeArAnnotationTrigger.HIGHLIGHT_TAP_AND_BARCODE_SCAN.

width
BarcodeArInfoAnnotationWidthPreset getWidth()
void setWidth(BarcodeArInfoAnnotationWidthPreset value)

Added in version 7.1.0

The annotation width. The default value is BarcodeArInfoAnnotationWidthPreset.SMALL.

body
@NonNull List<@NonNull BarcodeArInfoAnnotationBodyComponent> getBody()
void setBody(@NonNull List<@NonNull BarcodeArInfoAnnotationBodyComponent> value)

Added in version 7.1.0

The annotation body, represented as an array of body components. The default value is [].

header
@Nullable BarcodeArInfoAnnotationHeader getHeader()
void setHeader(@Nullable BarcodeArInfoAnnotationHeader value)

Added in version 7.1.0

The annotation header. The default value is null.

footer
@Nullable BarcodeArInfoAnnotationFooter getFooter()
void setFooter(@Nullable BarcodeArInfoAnnotationFooter value)

Added in version 7.1.0

The annotation footer. The default value is null.

backgroundColor
int getBackgroundColor()
void setBackgroundColor(int value)

Added in version 7.1.0

The background color. The default value is #CCFFFFFF.

listener
@NonNull BarcodeArInfoAnnotationListener getListener()
void setListener(@NonNull BarcodeArInfoAnnotationListener value)

Added in version 7.1.0

An object that receives notifications for UI-related events.