Class DetectionOverlayView
java.lang.Object
com.microblink.blinkinput.fragment.overlay.documentcapture.detectionui.DetectionOverlayView
- All Implemented Interfaces:
DocumentCaptureContract.OverlayView
-
Constructor Summary
ConstructorsConstructorDescriptionDetectionOverlayView(DetectionOverlayStrings strings, int style) DetectionOverlayView(DetectionOverlayStrings strings, int style, boolean showTopButtons) -
Method Summary
Modifier and TypeMethodDescriptionvoidbindOverlayController(DocumentCaptureContract.OverlayController overlayController) Bind given overlay controller to this view.voidcleanup()Called when view will not be used anymore, here you should finish all remaining view actions and its resources.voidClears all displayed actions.voidClears all document detection information.voidcreateLayout(android.content.Context context, RecognizerRunnerView parentView) Inflate your custom layout here and add it to the parent view.voidonConfigurationChanged(RecognizerRunnerView recognizerRunnerview, android.content.res.Configuration newConfiguration) Called on device configuration change.voidPerforms UI modifications when scanning is started.voidonTorchStateChanged(boolean torchOn) Called when torch state is changed, when it is turned off or on.voidonTorchSupportStatusAvailable(boolean cameraSupportsTorch) Called when camera device torch support status is available.voidshowAction(DocumentCaptureAction action) Displays some action message the to user.voidshowDetection(DisplayableQuadDetection quadDetection) Displays given detection to the user.voidshowScanSuccess(DocumentCaptureContract.UiUpdateListener uiUpdateListener) Displays the scan success.
-
Constructor Details
-
DetectionOverlayView
public DetectionOverlayView(@NonNull DetectionOverlayStrings strings, @StyleRes int style, boolean showTopButtons) -
DetectionOverlayView
-
-
Method Details
-
bindOverlayController
Description copied from interface:DocumentCaptureContract.OverlayViewBind given overlay controller to this view.- Specified by:
bindOverlayControllerin interfaceDocumentCaptureContract.OverlayView- Parameters:
overlayController- overlay controller that should be used for view actions.
-
createLayout
@NonNull public void createLayout(@NonNull android.content.Context context, @NonNull RecognizerRunnerView parentView) Description copied from interface:DocumentCaptureContract.OverlayViewInflate your custom layout here and add it to the parent view.- Specified by:
createLayoutin interfaceDocumentCaptureContract.OverlayView- Parameters:
context- application contextparentView- root view to be used as inflation parent
-
onConfigurationChanged
public void onConfigurationChanged(RecognizerRunnerView recognizerRunnerview, android.content.res.Configuration newConfiguration) Description copied from interface:DocumentCaptureContract.OverlayViewCalled on device configuration change.- Specified by:
onConfigurationChangedin interfaceDocumentCaptureContract.OverlayView
-
onTorchSupportStatusAvailable
public void onTorchSupportStatusAvailable(boolean cameraSupportsTorch) Description copied from interface:DocumentCaptureContract.OverlayViewCalled when camera device torch support status is available.- Specified by:
onTorchSupportStatusAvailablein interfaceDocumentCaptureContract.OverlayView- Parameters:
cameraSupportsTorch- whether used camera supports torch
-
onTorchStateChanged
public void onTorchStateChanged(boolean torchOn) Description copied from interface:DocumentCaptureContract.OverlayViewCalled when torch state is changed, when it is turned off or on.- Specified by:
onTorchStateChangedin interfaceDocumentCaptureContract.OverlayView- Parameters:
torchOn-trueif torch is turned on,falseif torch is turned off.
-
clearDetection
public void clearDetection()Description copied from interface:DocumentCaptureContract.OverlayViewClears all document detection information.- Specified by:
clearDetectionin interfaceDocumentCaptureContract.OverlayView
-
showDetection
Description copied from interface:DocumentCaptureContract.OverlayViewDisplays given detection to the user.- Specified by:
showDetectionin interfaceDocumentCaptureContract.OverlayView- Parameters:
quadDetection- detection location with status.
-
onScanStarted
public void onScanStarted()Description copied from interface:DocumentCaptureContract.OverlayViewPerforms UI modifications when scanning is started.- Specified by:
onScanStartedin interfaceDocumentCaptureContract.OverlayView
-
showScanSuccess
Description copied from interface:DocumentCaptureContract.OverlayViewDisplays the scan success.- Specified by:
showScanSuccessin interfaceDocumentCaptureContract.OverlayView- Parameters:
uiUpdateListener- listener that will be notified when all UI actions are finished (UI changes, animations...).
-
showAction
Description copied from interface:DocumentCaptureContract.OverlayViewDisplays some action message the to user.- Specified by:
showActionin interfaceDocumentCaptureContract.OverlayView- Parameters:
action- action that should be displayed.
-
clearAction
public void clearAction()Description copied from interface:DocumentCaptureContract.OverlayViewClears all displayed actions.- Specified by:
clearActionin interfaceDocumentCaptureContract.OverlayView
-
cleanup
public void cleanup()Description copied from interface:DocumentCaptureContract.OverlayViewCalled when view will not be used anymore, here you should finish all remaining view actions and its resources.- Specified by:
cleanupin interfaceDocumentCaptureContract.OverlayView
-