Interface DocumentCaptureContract.OverlayView

All Known Implementing Classes:
DetectionOverlayView
Enclosing interface:
DocumentCaptureContract

public static interface DocumentCaptureContract.OverlayView
  • Method Details

    • bindOverlayController

      void bindOverlayController(DocumentCaptureContract.OverlayController overlayController)
      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 context
      parentView - 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 - true if torch is turned on, false if torch is turned off.
    • clearDetection

      void clearDetection()
      Clears all document detection information.
    • showDetection

      void showDetection(@NonNull DisplayableQuadDetection quadDetection)
      Displays given detection to the user.
      Parameters:
      quadDetection - detection location with status.
    • onScanStarted

      void onScanStarted()
      Performs UI modifications when scanning is started.
    • showScanSuccess

      void showScanSuccess(DocumentCaptureContract.UiUpdateListener uiUpdateListener)
      Displays the scan success.
      Parameters:
      uiUpdateListener - listener that will be notified when all UI actions are finished (UI changes, animations...).
    • showAction

      void showAction(DocumentCaptureAction action)
      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.