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 Booleanvisibleprivate FinderStylestyleprivate ScanbotColoroverlayColorprivate AspectRatioaspectRatio
-
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 BooleangetVisible()Determines whether the viewfinder is visible or not. final UnitsetVisible(Boolean visible)Determines whether the viewfinder is visible or not. final FinderStylegetStyle()The visual appearance of the viewfinder. final UnitsetStyle(FinderStyle style)The visual appearance of the viewfinder. final ScanbotColorgetOverlayColor()The color of the viewfinder overlay. final UnitsetOverlayColor(ScanbotColor overlayColor)The color of the viewfinder overlay. final AspectRatiogetAspectRatio()The viewfinder's aspect ratio. final UnitsetAspectRatio(AspectRatio aspectRatio)The viewfinder's aspect ratio. final JSONObjecttoJson()final static ViewFinderConfigurationdefault()-
-
Constructor Detail
-
ViewFinderConfiguration
ViewFinderConfiguration(JSONObject json)
-
ViewFinderConfiguration
ViewFinderConfiguration(Boolean visible, FinderStyle style, ScanbotColor overlayColor, AspectRatio aspectRatio)
-
-
Method Detail
-
getVisible
final Boolean getVisible()
Determines whether the viewfinder is visible or not. Default is true
-
setVisible
final Unit setVisible(Boolean visible)
Determines whether the viewfinder is visible or not. Default is true
-
getStyle
final FinderStyle getStyle()
The visual appearance of the viewfinder.
-
setStyle
final Unit setStyle(FinderStyle style)
The visual appearance of the viewfinder.
-
getOverlayColor
final ScanbotColor getOverlayColor()
The color of the viewfinder overlay. Default is "?sbColorSurfaceLow"
-
setOverlayColor
final Unit setOverlayColor(ScanbotColor overlayColor)
The 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()
-
-
-
-