Package io.scanbot.sdk.ui_v2.common
Class ViewFinderConfiguration
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class ViewFinderConfiguration extends BaseViewFinderConfiguration implements Parcelable
Configuration of the scanning interface’s viewfinder, allowing it to be shown or hidden as guidance to the user.
-
-
Field Summary
Fields Modifier and Type Field Description private final String_typeprivate FinderStylestyleprivate ScanbotColoroverlayColorprivate AspectRatioaspectRatioprivate EdgeInsetsminimumInsetsprivate DoublepreferredHeightprivate Booleanvisible
-
Constructor Summary
Constructors Constructor Description ViewFinderConfiguration(Map<String, Object> source)ViewFinderConfiguration(JSONObject json)ViewFinderConfiguration(FinderStyle style, ScanbotColor overlayColor, AspectRatio aspectRatio, EdgeInsets minimumInsets, Double preferredHeight, Boolean visible)
-
Method Summary
Modifier and Type Method Description Stringget_type()FinderStylegetStyle()The visual appearance of the viewfinder. UnitsetStyle(FinderStyle style)The visual appearance of the viewfinder. ScanbotColorgetOverlayColor()The color of the viewfinder overlay. UnitsetOverlayColor(ScanbotColor overlayColor)The color of the viewfinder overlay. AspectRatiogetAspectRatio()The viewfinder's aspect ratio. UnitsetAspectRatio(AspectRatio aspectRatio)The viewfinder's aspect ratio. EdgeInsetsgetMinimumInsets()The minimum insets of the viewfinder. UnitsetMinimumInsets(EdgeInsets minimumInsets)The minimum insets of the viewfinder. DoublegetPreferredHeight()The preferred height of the viewfinder. UnitsetPreferredHeight(Double preferredHeight)The preferred height of the viewfinder. final BooleangetVisible()Whether the viewfinder is visible. final UnitsetVisible(Boolean visible)Whether the viewfinder is visible. JSONObjecttoJson(ToJsonConfiguration config)ViewFinderConfigurationclone()final static ViewFinderConfigurationdefault()-
-
Constructor Detail
-
ViewFinderConfiguration
ViewFinderConfiguration(JSONObject json)
-
ViewFinderConfiguration
ViewFinderConfiguration(FinderStyle style, ScanbotColor overlayColor, AspectRatio aspectRatio, EdgeInsets minimumInsets, Double preferredHeight, Boolean visible)
-
-
Method Detail
-
getStyle
FinderStyle getStyle()
The visual appearance of the viewfinder.
-
setStyle
Unit setStyle(FinderStyle style)
The visual appearance of the viewfinder.
-
getOverlayColor
ScanbotColor getOverlayColor()
The color of the viewfinder overlay.
Default is "?sbColorSurfaceLow"
-
setOverlayColor
Unit setOverlayColor(ScanbotColor overlayColor)
The color of the viewfinder overlay.
Default is "?sbColorSurfaceLow"
-
getAspectRatio
AspectRatio getAspectRatio()
The viewfinder's aspect ratio.
-
setAspectRatio
Unit setAspectRatio(AspectRatio aspectRatio)
The viewfinder's aspect ratio.
-
getMinimumInsets
EdgeInsets getMinimumInsets()
The minimum insets of the viewfinder.
-
setMinimumInsets
Unit setMinimumInsets(EdgeInsets minimumInsets)
The minimum insets of the viewfinder.
-
getPreferredHeight
Double getPreferredHeight()
The preferred height of the viewfinder.
Default is -1.0
-
setPreferredHeight
Unit setPreferredHeight(Double preferredHeight)
The preferred height of the viewfinder.
Default is -1.0
-
getVisible
final Boolean getVisible()
Whether the viewfinder is visible.
Default is true
-
setVisible
final Unit setVisible(Boolean visible)
Whether the viewfinder is visible.
Default is true
-
toJson
JSONObject toJson(ToJsonConfiguration config)
-
clone
ViewFinderConfiguration clone()
-
default
final static ViewFinderConfiguration default()
-
-
-
-