Interface DocumentCaptureContract.OverlayView
- All Known Implementing Classes:
DetectionOverlayView
- Enclosing interface:
- DocumentCaptureContract
public static interface DocumentCaptureContract.OverlayView
-
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.
-
Method Details
-
bindOverlayController
Bind given overlay controller to this view.- Parameters:
overlayController- overlay controller that should be used for view actions.
-
createLayout
@NonNull void createLayout(@NonNull android.content.Context context, @NonNull RecognizerRunnerView parentView) Inflate your custom layout here and add it to the parent view.- Parameters:
context- application contextparentView- root view to be used as inflation parent
-
onConfigurationChanged
void onConfigurationChanged(RecognizerRunnerView recognizerRunnerview, android.content.res.Configuration newConfiguration) Called on device configuration change. -
onTorchSupportStatusAvailable
void onTorchSupportStatusAvailable(boolean cameraSupportsTorch) Called when camera device torch support status is available.- Parameters:
cameraSupportsTorch- whether used camera supports torch
-
onTorchStateChanged
void onTorchStateChanged(boolean torchOn) Called when torch state is changed, when it is turned off or on.- Parameters:
torchOn-trueif torch is turned on,falseif torch is turned off.
-
clearDetection
void clearDetection()Clears all document detection information. -
showDetection
Displays given detection to the user.- Parameters:
quadDetection- detection location with status.
-
onScanStarted
void onScanStarted()Performs UI modifications when scanning is started. -
showScanSuccess
Displays the scan success.- Parameters:
uiUpdateListener- listener that will be notified when all UI actions are finished (UI changes, animations...).
-
showAction
Displays some action message the to user.- Parameters:
action- action that should be displayed.
-
clearAction
void clearAction()Clears all displayed actions. -
cleanup
void cleanup()Called when view will not be used anymore, here you should finish all remaining view actions and its resources.
-