Class FinderOverlayView
-
- 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.camera.IFinderView,io.scanbot.sdk.camera.autosnapping.IAutoSnappingController.AutoSnappingStateListener
public class FinderOverlayView extends FrameLayout implements IFinderView, IAutoSnappingController.AutoSnappingStateListener
Represents default ScanbotSDK Finder view overlay
-
-
Field Summary
Fields Modifier and Type Field Description private BooleanautoSnapProgressEnabledprivate IntegertargetMaxHeightprivate IntegertargetMaxWidthprivate <Error class: unknown class>finderInsetsprivate <Error class: unknown class>safeAreaInsetsprivate IntegeroverlayLeftPaddingprivate IntegeroverlayTopPaddingprivate IntegeroverlayRightPaddingprivate IntegeroverlayBottomPadding
-
Constructor Summary
Constructors Constructor Description FinderOverlayView(Context context, AttributeSet attr)
-
Method Summary
Modifier and Type Method Description final BooleangetAutoSnapProgressEnabled()final UnitsetAutoSnapProgressEnabled(Boolean autoSnapProgressEnabled)IntegergetTargetMaxHeight()Set the maximus size of the finder bigger size. UnitsetTargetMaxHeight(Integer targetMaxHeight)IntegergetTargetMaxWidth()Set the maximus size of the finder bigger size. UnitsetTargetMaxWidth(Integer targetMaxWidth)final <Error class: unknown class>getFinderInsets()Changes finder view padding to preview edges final Unit)>setFinderInsets(<Error class: unknown class> finderInsets)final <Error class: unknown class>getSafeAreaInsets()Set a padding to finder parts that will be covered with other view's, like toolbar on top of the screen, and navigation bars on bottom of the screens final Unit)>setSafeAreaInsets(<Error class: unknown class> safeAreaInsets)final IntegergetOverlayLeftPadding()final UnitsetOverlayLeftPadding(Integer overlayLeftPadding)final IntegergetOverlayTopPadding()final UnitsetOverlayTopPadding(Integer overlayTopPadding)final IntegergetOverlayRightPadding()final UnitsetOverlayRightPadding(Integer overlayRightPadding)final IntegergetOverlayBottomPadding()final UnitsetOverlayBottomPadding(Integer overlayBottomPadding)final UnitsetTopPlaceholder(View view)Set view on top of the finder window| | | topPlaceholder | || | | | | || | | | | |_________________| final UnitsetBottomPlaceholder(View view)Set view on bottom of the finder window| | | | || | | | | || | | |bottomPlaceholder| |_________________| final UnitsetFinderPlaceholder(View view)Set view inside of the finder window| | | | || | | | finderWindow | || | | | | |_________________| UnitsetCameraParameters(Integer previewWidth, Integer previewHeight, CameraPreviewMode cameraPreviewMode)Set camera parameters final UnitsetOverlayColor(Integer overlayColor)Changes fill color of the Finder view final UnitsetFinderMinPadding(Integer padding)Changes finder view padding to screen edges. final UnitsetStrokeColor(Integer strokeColor)Changes stroke color of the Finder view. final UnitsetStrokeWidth(Integer strokeWidth)Changes stroke width of the Finder view. final UnitsetCornerRadius(Integer radius)Changes the corner Radius of the Finder view. final UnitsetFixedFinderWidth(Integer fixedFinderWidth)Set fixed Finder view window width. final UnitsetFixedFinderHeight(Integer fixedFinderHeight)Set fixed Finder view window height. final UnitsetAutoSnappingProgressStrokeColor(Integer strokeColor)Changes stroke color of the polygon animated progress line. final UnitsetAutoSnappingProgressStrokeWidth(Integer strokeWidth)Changes width of the stroke of the autosnapping animated polygon. final UnitsetRequiredAspectRatios(List<AspectRatio> requiredAspectRatios)Set required {@link PageAspectRatio}s. UnitresizeContentViews()UnitsetScaleX(Float scaleX)UnitsetScaleY(Float scaleY)final UnitsetFinderInset(Integer left, Integer top, Integer right, Integer bottom)Changes finder view visible paddings to its edges final UnitsetSafeAreaInset(Integer left, Integer top, Integer right, Integer bottom)Changes additional finder view paddings that works as safe area to the others views UnitonAutoSnappingCanceled()Triggers when autosnapping won't start within this delay UnitonAutoSnappingIn(Long ms)Triggers when autosnapping will start in within delay UnitonAutoSnappingFinished()Triggers when autosnapping is finished (it happens when camera returns taken picture) -
-
Constructor Detail
-
FinderOverlayView
FinderOverlayView(Context context, AttributeSet attr)
-
-
Method Detail
-
getAutoSnapProgressEnabled
final Boolean getAutoSnapProgressEnabled()
-
setAutoSnapProgressEnabled
final Unit setAutoSnapProgressEnabled(Boolean autoSnapProgressEnabled)
-
getTargetMaxHeight
Integer getTargetMaxHeight()
Set the maximus size of the finder bigger size. Finder can be smaller if the size of screen minus insets is smaller than finderMaxSize
-
setTargetMaxHeight
Unit setTargetMaxHeight(Integer targetMaxHeight)
-
getTargetMaxWidth
Integer getTargetMaxWidth()
Set the maximus size of the finder bigger size. Finder can be smaller if the size of screen minus insets is smaller than finderMaxSize
-
setTargetMaxWidth
Unit setTargetMaxWidth(Integer targetMaxWidth)
-
getFinderInsets
final <Error class: unknown class> getFinderInsets()
Changes finder view padding to preview edges
-
setFinderInsets
final Unit )>setFinderInsets(<Error class: unknown class> finderInsets)
-
getSafeAreaInsets
final <Error class: unknown class> getSafeAreaInsets()
Set a padding to finder parts that will be covered with other view's, like toolbar on top of the screen, and navigation bars on bottom of the screens
-
setSafeAreaInsets
final Unit )>setSafeAreaInsets(<Error class: unknown class> safeAreaInsets)
-
getOverlayLeftPadding
final Integer getOverlayLeftPadding()
-
setOverlayLeftPadding
final Unit setOverlayLeftPadding(Integer overlayLeftPadding)
-
getOverlayTopPadding
final Integer getOverlayTopPadding()
-
setOverlayTopPadding
final Unit setOverlayTopPadding(Integer overlayTopPadding)
-
getOverlayRightPadding
final Integer getOverlayRightPadding()
-
setOverlayRightPadding
final Unit setOverlayRightPadding(Integer overlayRightPadding)
-
getOverlayBottomPadding
final Integer getOverlayBottomPadding()
-
setOverlayBottomPadding
final Unit setOverlayBottomPadding(Integer overlayBottomPadding)
-
setTopPlaceholder
final Unit setTopPlaceholder(View view)
Set view on top of the finder window
| | | topPlaceholder | || | | | | || | | | | |_________________|
-
setBottomPlaceholder
final Unit setBottomPlaceholder(View view)
Set view on bottom of the finder window
| | | | || | | | | || | | |bottomPlaceholder| |_________________|
-
setFinderPlaceholder
final Unit setFinderPlaceholder(View view)
Set view inside of the finder window
| | | | || | | | finderWindow | || | | | | |_________________|
-
setCameraParameters
Unit setCameraParameters(Integer previewWidth, Integer previewHeight, CameraPreviewMode cameraPreviewMode)
Set camera parameters
-
setOverlayColor
final Unit setOverlayColor(Integer overlayColor)
Changes fill color of the Finder view
- Parameters:
overlayColor- color (not resource!) to draw Finder overlay with.
-
setFinderMinPadding
final Unit setFinderMinPadding(Integer padding)
Changes finder view padding to screen edges. WILL OVERRIDE finderInsets param
- Parameters:
padding- value of padding in pixels
-
setStrokeColor
final Unit setStrokeColor(Integer strokeColor)
Changes stroke color of the Finder view.
- Parameters:
strokeColor- color (not resource!) to draw Finder overlay lines with.
-
setStrokeWidth
final Unit setStrokeWidth(Integer strokeWidth)
Changes stroke width of the Finder view.
- Parameters:
strokeWidth- width (not resource!) to draw Finder overlay lines with.
-
setCornerRadius
final Unit setCornerRadius(Integer radius)
Changes the corner Radius of the Finder view.
- Parameters:
radius- width (not resource!) to draw Finder overlay lines with.
-
setFixedFinderWidth
final Unit setFixedFinderWidth(Integer fixedFinderWidth)
Set fixed Finder view window width.
- Parameters:
fixedFinderWidth- fixed width (not resource!) to draw Finder overlay window.
-
setFixedFinderHeight
final Unit setFixedFinderHeight(Integer fixedFinderHeight)
Set fixed Finder view window height.
- Parameters:
fixedFinderHeight- fixed height (not resource!) to draw Finder overlay window.
-
setAutoSnappingProgressStrokeColor
final Unit setAutoSnappingProgressStrokeColor(Integer strokeColor)
Changes stroke color of the polygon animated progress line.
- Parameters:
strokeColor- color to draw lines with.
-
setAutoSnappingProgressStrokeWidth
final Unit setAutoSnappingProgressStrokeWidth(Integer strokeWidth)
Changes width of the stroke of the autosnapping animated polygon.
- Parameters:
strokeWidth- width of the stroke in pixels.
-
setRequiredAspectRatios
final Unit setRequiredAspectRatios(List<AspectRatio> requiredAspectRatios)
Set required {@link PageAspectRatio}s.
-
resizeContentViews
Unit resizeContentViews()
-
setFinderInset
final Unit setFinderInset(Integer left, Integer top, Integer right, Integer bottom)
Changes finder view visible paddings to its edges
-
setSafeAreaInset
final Unit setSafeAreaInset(Integer left, Integer top, Integer right, Integer bottom)
Changes additional finder view paddings that works as safe area to the others views
-
onAutoSnappingCanceled
Unit onAutoSnappingCanceled()
Triggers when autosnapping won't start within this delay
-
onAutoSnappingIn
Unit onAutoSnappingIn(Long ms)
Triggers when autosnapping will start in within delay
- Parameters:
ms- delay in milliseconds
-
onAutoSnappingFinished
Unit onAutoSnappingFinished()
Triggers when autosnapping is finished (it happens when camera returns taken picture)
-
-
-
-