Package io.scanbot.sdk.ui_v2.common
Class ViewFinderConfiguration
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class ViewFinderConfiguration implements Parcelable
Configuration of the scanning interface's viewfinder, serving as guidance to the user.
-
-
Field Summary
Fields Modifier and Type Field Description private Boolean
visible
private FinderStyle
style
private ScanbotColor
overlayColor
private AspectRatio
aspectRatio
-
Constructor Summary
Constructors Constructor Description ViewFinderConfiguration(Map<String, Object> source)
ViewFinderConfiguration(JSONObject json)
ViewFinderConfiguration(Boolean visible, FinderStyle style, ScanbotColor overlayColor, AspectRatio aspectRatio)
-
Method Summary
Modifier and Type Method Description final Boolean
getVisible()
Whether the viewfinder is visible. final Unit
setVisible(Boolean visible)
Whether the viewfinder is visible. final FinderStyle
getStyle()
Visual appearance of the viewfinder. final Unit
setStyle(FinderStyle style)
Visual appearance of the viewfinder. final ScanbotColor
getOverlayColor()
Color of the viewfinder overlay. final Unit
setOverlayColor(ScanbotColor overlayColor)
Color of the viewfinder overlay. final AspectRatio
getAspectRatio()
The viewfinder's aspect ratio. final Unit
setAspectRatio(AspectRatio aspectRatio)
The viewfinder's aspect ratio. final JSONObject
toJson()
final static ViewFinderConfiguration
default()
-
-
Constructor Detail
-
ViewFinderConfiguration
ViewFinderConfiguration(JSONObject json)
-
ViewFinderConfiguration
ViewFinderConfiguration(Boolean visible, FinderStyle style, ScanbotColor overlayColor, AspectRatio aspectRatio)
-
-
Method Detail
-
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
-
getStyle
final FinderStyle getStyle()
Visual appearance of the viewfinder.
-
setStyle
final Unit setStyle(FinderStyle style)
Visual appearance of the viewfinder.
-
getOverlayColor
final ScanbotColor getOverlayColor()
Color of the viewfinder overlay. Default is "?sbColorSurfaceLow"
-
setOverlayColor
final Unit setOverlayColor(ScanbotColor overlayColor)
Color of the viewfinder overlay. Default is "?sbColorSurfaceLow"
-
getAspectRatio
final AspectRatio getAspectRatio()
The viewfinder's aspect ratio.
-
setAspectRatio
final Unit setAspectRatio(AspectRatio aspectRatio)
The viewfinder's aspect ratio.
-
toJson
final JSONObject toJson()
-
default
final static ViewFinderConfiguration default()
-
-
-
-