Class BarcodePolygonsView
-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback
,android.view.KeyEvent.Callback
,android.view.ViewManager
,android.view.ViewParent
,android.view.accessibility.AccessibilityEventSource
,io.scanbot.sdk.ui.BasePolygonView
public final class BarcodePolygonsView extends FrameLayout implements BasePolygonView
Draws polygons reacting on FrameHandler result
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
BarcodePolygonsView.BarcodePolygonStyle
Class that declares appearance of polygon
public final class
BarcodePolygonsView.BarcodeTextViewStyle
Class that declares appearance of default text view
public final class
BarcodePolygonsView.BarcodeElement
Internal class that declares barcode state on the view.
public interface
BarcodePolygonsView.PolygonValueClickListener
A callback interface for the View under the polygon
public interface
BarcodePolygonsView.BarcodeItemViewFactory
Factory interface for the view under the polygon
public interface
BarcodePolygonsView.BarcodeItemViewBinder
Interface for the binding a BarcodeItem to a view created by BarcodeItemViewFactory
public interface
BarcodePolygonsView.BarcodeItemViewPositionHandler
Interface for the correcting position a BarcodeItem view created by BarcodeItemViewFactory to a barcode polygon path
public interface
BarcodePolygonsView.BarcodeHighlightDelegate
Interface for a BarcodeItem to be marked as highlighted or not. Should be fast (called in onDraw)
public interface
BarcodePolygonsView.BarcodeAppearanceDelegate
Interface for a BarcodeItem to decide the appearance of the given barcode polygon
-
Field Summary
Fields Modifier and Type Field Description public final static Long
RETAIN_BARCODE_TIMEOUT_MS
public final static String
TAG
private Boolean
processingEnabled
private BarcodePolygonsView.PolygonValueClickListener
polygonValueClickListener
private BarcodePolygonsView.BarcodeAppearanceDelegate
barcodeAppearanceDelegate
private BarcodePolygonsView.BarcodeHighlightDelegate
barcodeHighlightDelegate
private BarcodePolygonsView.BarcodeItemViewFactory
barcodeItemViewFactory
private BarcodePolygonsView.BarcodeItemViewBinder
barcodeItemViewBinder
private BarcodePolygonsView.BarcodeItemViewPositionHandler
barcodeItemPositionHandler
private final FrameHandler
frameHandler
private final BarcodeDetectorFrameHandler.ResultHandler
barcodesResultHandler
private <Error class: unknown class>
cancelJob
private <Error class: unknown class>
appearanceJob
private <Error class: unknown class>
styleJob
-
Constructor Summary
Constructors Constructor Description BarcodePolygonsView(Context context)
BarcodePolygonsView(Context context, AttributeSet attrs)
-
Method Summary
Modifier and Type Method Description final Boolean
getProcessingEnabled()
final Unit
setProcessingEnabled(Boolean processingEnabled)
final BarcodePolygonsView.PolygonValueClickListener
getPolygonValueClickListener()
Allows to set a click listener to the view under the polygon created by barcodeItemViewFactory final Unit
setPolygonValueClickListener(BarcodePolygonsView.PolygonValueClickListener polygonValueClickListener)
Allows to set a click listener to the view under the polygon created by barcodeItemViewFactory final BarcodePolygonsView.BarcodeAppearanceDelegate
getBarcodeAppearanceDelegate()
Allows to set a style delegate to the view final Unit
setBarcodeAppearanceDelegate(BarcodePolygonsView.BarcodeAppearanceDelegate barcodeAppearanceDelegate)
Allows to set a style delegate to the view final BarcodePolygonsView.BarcodeHighlightDelegate
getBarcodeHighlightDelegate()
Allows to set a delegate to decide if the given barcode should be highlighted final Unit
setBarcodeHighlightDelegate(BarcodePolygonsView.BarcodeHighlightDelegate barcodeHighlightDelegate)
Allows to set a delegate to decide if the given barcode should be highlighted final BarcodePolygonsView.BarcodeItemViewFactory
getBarcodeItemViewFactory()
Factory for the views appearing on the bottom of the barcode (or null if the view is not needed) final Unit
setBarcodeItemViewFactory(BarcodePolygonsView.BarcodeItemViewFactory barcodeItemViewFactory)
Factory for the views appearing on the bottom of the barcode (or null if the view is not needed) final BarcodePolygonsView.BarcodeItemViewBinder
getBarcodeItemViewBinder()
Callback for the binding a BarcodeItem to a view created by BarcodeItemViewFactory final Unit
setBarcodeItemViewBinder(BarcodePolygonsView.BarcodeItemViewBinder barcodeItemViewBinder)
Callback for the binding a BarcodeItem to a view created by BarcodeItemViewFactory final BarcodePolygonsView.BarcodeItemViewPositionHandler
getBarcodeItemPositionHandler()
final Unit
setBarcodeItemPositionHandler(BarcodePolygonsView.BarcodeItemViewPositionHandler barcodeItemPositionHandler)
final FrameHandler
getFrameHandler()
Attach this frame handler to IScanbotCameraView final BarcodeDetectorFrameHandler.ResultHandler
getBarcodesResultHandler()
Add this result handler to your BarcodeDetectorFrameHandler final <Error class: unknown class>
getCancelJob()
final Unit
)>setCancelJob(<Error class: unknown class> cancelJob)
final <Error class: unknown class>
getAppearanceJob()
final Unit
)>setAppearanceJob(<Error class: unknown class> appearanceJob)
final <Error class: unknown class>
getStyleJob()
final Unit
)>setStyleJob(<Error class: unknown class> styleJob)
final Unit
resetPolygonState()
Reset the state of the view Boolean
onTouchEvent(MotionEvent event)
-
-
Constructor Detail
-
BarcodePolygonsView
BarcodePolygonsView(Context context)
-
BarcodePolygonsView
BarcodePolygonsView(Context context, AttributeSet attrs)
-
-
Method Detail
-
getProcessingEnabled
final Boolean getProcessingEnabled()
-
setProcessingEnabled
final Unit setProcessingEnabled(Boolean processingEnabled)
-
getPolygonValueClickListener
final BarcodePolygonsView.PolygonValueClickListener getPolygonValueClickListener()
Allows to set a click listener to the view under the polygon created by barcodeItemViewFactory
-
setPolygonValueClickListener
final Unit setPolygonValueClickListener(BarcodePolygonsView.PolygonValueClickListener polygonValueClickListener)
Allows to set a click listener to the view under the polygon created by barcodeItemViewFactory
-
getBarcodeAppearanceDelegate
final BarcodePolygonsView.BarcodeAppearanceDelegate getBarcodeAppearanceDelegate()
Allows to set a style delegate to the view
-
setBarcodeAppearanceDelegate
final Unit setBarcodeAppearanceDelegate(BarcodePolygonsView.BarcodeAppearanceDelegate barcodeAppearanceDelegate)
Allows to set a style delegate to the view
-
getBarcodeHighlightDelegate
final BarcodePolygonsView.BarcodeHighlightDelegate getBarcodeHighlightDelegate()
Allows to set a delegate to decide if the given barcode should be highlighted
-
setBarcodeHighlightDelegate
final Unit setBarcodeHighlightDelegate(BarcodePolygonsView.BarcodeHighlightDelegate barcodeHighlightDelegate)
Allows to set a delegate to decide if the given barcode should be highlighted
-
getBarcodeItemViewFactory
final BarcodePolygonsView.BarcodeItemViewFactory getBarcodeItemViewFactory()
Factory for the views appearing on the bottom of the barcode (or null if the view is not needed)
-
setBarcodeItemViewFactory
final Unit setBarcodeItemViewFactory(BarcodePolygonsView.BarcodeItemViewFactory barcodeItemViewFactory)
Factory for the views appearing on the bottom of the barcode (or null if the view is not needed)
-
getBarcodeItemViewBinder
final BarcodePolygonsView.BarcodeItemViewBinder getBarcodeItemViewBinder()
Callback for the binding a BarcodeItem to a view created by BarcodeItemViewFactory
-
setBarcodeItemViewBinder
final Unit setBarcodeItemViewBinder(BarcodePolygonsView.BarcodeItemViewBinder barcodeItemViewBinder)
Callback for the binding a BarcodeItem to a view created by BarcodeItemViewFactory
-
getBarcodeItemPositionHandler
final BarcodePolygonsView.BarcodeItemViewPositionHandler getBarcodeItemPositionHandler()
-
setBarcodeItemPositionHandler
final Unit setBarcodeItemPositionHandler(BarcodePolygonsView.BarcodeItemViewPositionHandler barcodeItemPositionHandler)
-
getFrameHandler
final FrameHandler getFrameHandler()
Attach this frame handler to IScanbotCameraView
-
getBarcodesResultHandler
final BarcodeDetectorFrameHandler.ResultHandler getBarcodesResultHandler()
Add this result handler to your BarcodeDetectorFrameHandler
-
getCancelJob
final <Error class: unknown class> getCancelJob()
-
setCancelJob
final Unit )>setCancelJob(<Error class: unknown class> cancelJob)
-
getAppearanceJob
final <Error class: unknown class> getAppearanceJob()
-
setAppearanceJob
final Unit )>setAppearanceJob(<Error class: unknown class> appearanceJob)
-
getStyleJob
final <Error class: unknown class> getStyleJob()
-
setStyleJob
final Unit )>setStyleJob(<Error class: unknown class> styleJob)
-
resetPolygonState
final Unit resetPolygonState()
Reset the state of the view
-
onTouchEvent
Boolean onTouchEvent(MotionEvent event)
-
-
-
-