Package com.microblink.blinkid.view.viewfinder.quadview

# Class QuadViewManager

java.lang.Object
com.microblink.blinkid.view.viewfinder.quadview.QuadViewManager

public class QuadViewManager extends Object
Class that manages animated quadrilateral detection result view.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected com.microblink.blinkid.view.viewfinder.quadview.QuadView`
  `mQuadView`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `animateQuadToDefaultPosition()`
  Call this method to begin quadrilateral animation to its default position.
  `void`
  `animateQuadToDetectionPosition(DisplayableQuadDetection quadDetection)`
  Call this method to begin quadrilateral animation to detected quadrilateral.
  `void`
  `configurationChanged(RecognizerRunnerView recognizerRunnerView, android.content.res.Configuration newConfig)`
  Inform quadview of configuration change event.
  `boolean`
  `isAnimationInProgress()`
  Returns true if quad view animation is currently in progress.
  `void`
  `setAnimationDuration(long durationMs)`
  Sets the duration in miliseconds of quadview animation.
  `void`
  `setAnimationListener(QuadViewAnimationListener listener)`
  Sets a listener that will be notified when quad animation has started and finished.
  `void`
  `setInitialHostActivityOrientation(int hostActivityOrientation)`
  Changes initial host activity orientation.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### mQuadView

    @NonNull protected com.microblink.blinkid.view.viewfinder.quadview.QuadView mQuadView

- ## Method Details

  - ### animateQuadToDefaultPosition

    @AnyThread public void animateQuadToDefaultPosition()
    Call this method to begin quadrilateral animation to its default position. It is safe to call this method from non-UI thread.

  - ### animateQuadToDetectionPosition

    @AnyThread public void animateQuadToDetectionPosition(@NonNull DisplayableQuadDetection quadDetection)
    Call this method to begin quadrilateral animation to detected quadrilateral.
    Parameters:
      `quadDetection` - detection to which quad will be animated

  - ### setAnimationDuration

    public void setAnimationDuration(long durationMs)
    Sets the duration in miliseconds of quadview animation.
    Parameters:
      `durationMs` - duration in miliseconds of quadview animations.

  - ### configurationChanged

    @MainThread public void configurationChanged(@NonNull RecognizerRunnerView recognizerRunnerView, @NonNull android.content.res.Configuration newConfig)
    Inform quadview of configuration change event.
    Parameters:
      `recognizerRunnerView` - RecognizerRunnerView used to create the QuadView. Make sure you've called changeConfiguration on it before calling this method.
      `newConfig` - New configuration as given by onConfigurationChanged activity callback.

  - ### isAnimationInProgress

    public boolean isAnimationInProgress()
    Returns true if quad view animation is currently in progress.
    Returns:
      true if quad view animation is currently in progress.

  - ### setAnimationListener

    public void setAnimationListener(@Nullable QuadViewAnimationListener listener)
    Sets a listener that will be notified when quad animation has started and finished.

  - ### setInitialHostActivityOrientation

    public void setInitialHostActivityOrientation(int hostActivityOrientation)
    Changes initial host activity orientation.
    Parameters:
      `hostActivityOrientation` - allowed values are:
      `ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE`
      `ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE`
      `ActivityInfo.SCREEN_ORIENTATION_PORTRAIT`
      `ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT`