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 Boolean
autoSnapProgressEnabled
private Integer
finderMaxSize
private <Error class: unknown class>
finderInsets
private <Error class: unknown class>
safeAreaInsets
private Integer
overlayLeftPadding
private Integer
overlayTopPadding
private Integer
overlayRightPadding
private Integer
overlayBottomPadding
-
Constructor Summary
Constructors Constructor Description FinderOverlayView(Context context, AttributeSet attr)
-
Method Summary
Modifier and Type Method Description final Boolean
getAutoSnapProgressEnabled()
final Unit
setAutoSnapProgressEnabled(Boolean autoSnapProgressEnabled)
Integer
getFinderMaxSize()
Set the maximus size of the finder bigger size. Unit
setFinderMaxSize(Integer finderMaxSize)
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 Integer
getOverlayLeftPadding()
final Unit
setOverlayLeftPadding(Integer overlayLeftPadding)
final Integer
getOverlayTopPadding()
final Unit
setOverlayTopPadding(Integer overlayTopPadding)
final Integer
getOverlayRightPadding()
final Unit
setOverlayRightPadding(Integer overlayRightPadding)
final Integer
getOverlayBottomPadding()
final Unit
setOverlayBottomPadding(Integer overlayBottomPadding)
final Unit
setTopPlaceholder(View view)
Set view on top of the finder window| | | topPlaceholder | || | | | | || | | | | |_________________| final Unit
setBottomPlaceholder(View view)
Set view on bottom of the finder window| | | | || | | | | || | | |bottomPlaceholder| |_________________| final Unit
setFinderPlaceholder(View view)
Set view inside of the finder window| | | | || | | | finderWindow | || | | | | |_________________| Unit
setCameraParameters(Integer previewWidth, Integer previewHeight, CameraPreviewMode cameraPreviewMode)
Set camera parameters final Unit
setOverlayColor(Integer overlayColor)
Changes fill color of the Finder view final Unit
setFinderMinPadding(Integer padding)
Changes finder view padding to screen edges. final Unit
setStrokeColor(Integer strokeColor)
Changes stroke color of the Finder view. final Unit
setStrokeWidth(Integer strokeWidth)
Changes stroke width of the Finder view. final Unit
setCornerRadius(Integer radius)
Changes the corner Radius of the Finder view. final Unit
setFixedFinderWidth(Integer fixedFinderWidth)
Set fixed Finder view window width. final Unit
setFixedFinderHeight(Integer fixedFinderHeight)
Set fixed Finder view window height. final Unit
setAutoSnappingProgressStrokeColor(Integer strokeColor)
Changes stroke color of the polygon animated progress line. final Unit
setAutoSnappingProgressStrokeWidth(Integer strokeWidth)
Changes width of the stroke of the autosnapping animated polygon. final Unit
setRequiredAspectRatios(List<AspectRatio> requiredAspectRatios)
Set required {@link PageAspectRatio}s. Unit
resizeContentViews()
Unit
setScaleX(Float scaleX)
Unit
setScaleY(Float scaleY)
final Unit
setFinderInset(Integer left, Integer top, Integer right, Integer bottom)
Changes finder view visible paddings to its edges 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 Unit
onAutoSnappingCanceled()
Triggers when autosnapping won't start within this delay Unit
onAutoSnappingIn(Long ms)
Triggers when autosnapping will start in within delay Unit
onAutoSnappingFinished()
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)
-
getFinderMaxSize
Integer getFinderMaxSize()
Set the maximus size of the finder bigger size. Finder can be smaller if the size of screen minus insets is smaller than finderMaxSize
-
setFinderMaxSize
Unit setFinderMaxSize(Integer finderMaxSize)
-
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)
-
-
-
-