Class ParamsCustomization
- java.lang.Object
-
- com.regula.documentreader.api.params.ParamsCustomization
-
public class ParamsCustomization extends java.lang.Object
Structure containing parameters for UI customization on the document capture screen- See Also:
- UI customization
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ParamsCustomization.CustomizationEditor
Interface used for modifyingParamsCustomization
object.
-
Constructor Summary
Constructors Constructor Description ParamsCustomization()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ParamsCustomization.CustomizationEditor
edit()
Create a new Editor for these preferences, through which you can make modifications to the data in the customization and atomically commit those changes back to the ParamsCustomization object.java.lang.String
getActivityIndicatorColor()
Hex string of loading indicator(s) colorjava.lang.Integer
getActivityIndicatorSize()
width and height of loading indicator(s)java.lang.Float
getBackgroundMaskAlpha()
Value representing transparency of the overlay mask around the camera frame.java.lang.String
getBackgroundMaskColor()
Hex string of current Background Mask colorDrawable
getBorderBackgroundImage()
Drawable displayed within the camera frameMatrix
getBorderBackgroundImageMatrix()
MATRIX used to scale border image Is used only whengetBorderBackgroundImageScaleType()
is set to ImageView.ScaleType#MATRIXImageView.ScaleType
getBorderBackgroundImageScaleType()
To change the scaling of the image, use one of the ImageView.ScaleType membersjava.lang.String
getCameraFrameActiveColor()
Hex string of document bounds border color in document detected statejava.lang.Integer
getCameraFrameBorderWidth()
Thickness of document bounds border on the video preview (dp)java.lang.Float
getCameraFrameCornerRadius()
Value in pixels representing the camera frame rectangle corner radius, 0 - no radiusjava.lang.String
getCameraFrameDefaultColor()
Hex string of document bounds border color in default statejava.lang.Float
getCameraFrameLandscapeAspectRatio()
Width / Height ratio applied to the camera frame in landscape orientation viewPaint.Cap
getCameraFrameLineCap()
This option specifies the treatment for the beginning and ending of stroked line in the camera frame.java.lang.Integer
getCameraFrameLineLength()
Defines the length (dp) of the corner side in shape mode FrameShapeType.CORNERjava.lang.Integer
getCameraFrameOffsetWidth()
Value in pixels the camera frame with will be decreased forjava.lang.Float
getCameraFramePortraitAspectRatio()
Width / Height ratio applied to the camera frame in portrait orientation viewjava.lang.Integer
getCameraFrameShapeType()
Defines the shape of document bounds borderjava.lang.Float
getCameraFrameVerticalPositionMultiplier()
Change the vertical position of the camera frame.java.lang.String
getCameraPreviewBackgroundColor()
Drawable
getCameraSwitchButtonDrawable()
Drawable used for camera switch buttonDrawable
getCaptureButtonDrawable()
Drawable used for capture buttonDrawable
getChangeFrameCollapseButtonDrawable()
Drawable used for the camera frame collapse buttonDrawable
getChangeFrameExpandButtonDrawable()
Drawable used for the camera frame expand buttonDrawable
getCloseButtonDrawable()
Drawable used for close buttonjava.util.HashMap<CustomizationColor,java.lang.Long>
getColors()
SpannableString
getCustomLabelStatus()
Additional message displayed on the status label next to framejava.lang.Float
getCustomStatusPositionMultiplier()
java.util.HashMap<CustomizationFont,java.lang.Integer>
getFonts()
java.util.HashMap<CustomizationFont,java.lang.Integer>
getFontSizes()
Drawable
getHelpAnimationImageDrawable()
Drawable displayed as instruction animation on scanning process startMatrix
getHelpAnimationImageMatrix()
MATRIX used to scale scanning instructional animation image Is used only when #getHelpAnimationImageScaleType() is set to ImageView.ScaleType#MATRIXImageView.ScaleType
getHelpAnimationImageScaleType()
To change the scaling of the image, use one of the ImageView.ScaleType membersDrawable
getHologramAnimationImage()
Deprecated.Matrix
getHologramAnimationImageMatrix()
Deprecated.ImageView.ScaleType
getHologramAnimationImageScaleType()
Deprecated.java.lang.Float
getHologramAnimationPositionMultiplier()
Deprecated.java.util.HashMap<CustomizationImage,Drawable>
getImages()
Drawable
getLivenessAnimationImage()
Drawable displayed as instruction animation, when liveness detection sequence is startedMatrix
getLivenessAnimationImageMatrix()
MATRIX used to scale liveness instructional animation image Is used only whengetHologramAnimationImageScaleType()
is set to ImageView.ScaleType#MATRIXImageView.ScaleType
getLivenessAnimationImageScaleType()
To change the scaling of the image, use one of the ImageView.ScaleType membersjava.lang.Float
getLivenessAnimationPositionMultiplier()
Change the position of liveness detection help animation.Drawable
getMultipageAnimationBackImage()
Drawable displayed during as second image on page turn hint animationMatrix
getMultipageAnimationBackImageMatrix()
MATRIX used to scale page turn animation second image Is used only whengetMultipageAnimationBackImageScaleType()
is set to ImageView.ScaleType#MATRIXImageView.ScaleType
getMultipageAnimationBackImageScaleType()
To change the scaling of the image, use one of the ImageView.ScaleType membersDrawable
getMultipageAnimationFrontImage()
Drawable displayed during as first image on page turn hint animationMatrix
getMultipageAnimationFrontImageMatrix()
MATRIX used to scale page turn animation first image Is used only whengetHelpAnimationImageScaleType()
is set to ImageView.ScaleType#MATRIXImageView.ScaleType
getMultipageAnimationFrontImageScaleType()
To change the scaling of the image, use one of the ImageView.ScaleType membersjava.lang.String
getMultipageButtonBackgroundColor()
Hex string of page skipping button backgroundjava.lang.Float
getNextPageAnimationEndDelay()
Animation delay after flip, 0 - is default valuejava.lang.Float
getNextPageAnimationStartDelay()
Animation delay before flip, 0 - is default valuejava.lang.String
getResultStatus()
Message displayed on the result status label next to framejava.lang.String
getResultStatusBackgroundColor()
Hex string of current text status background colorjava.lang.Float
getResultStatusPositionMultiplier()
java.lang.String
getResultStatusTextColor()
Hex string of current text status colorTypeface
getResultStatusTextFont()
Typeface of current text statusjava.lang.Integer
getResultStatusTextSize()
Size of current text status (sp)java.lang.String
getStatus()
Message displayed on the status label next to framejava.lang.String
getStatusBackgroundColor()
Hex string of main text status background colorjava.lang.Float
getStatusPositionMultiplier()
You can change the location of the status message.java.lang.String
getStatusTextColor()
Hex string of main text status colorTypeface
getStatusTextFont()
Typeface of main text statusjava.lang.Integer
getStatusTextSize()
Size of main text status (sp)java.lang.String
getTintColor()
Hex string of visual elements color (one for all)java.lang.Float
getToolbarSize()
Value in pixels, representing height of the toolbar at the bottom of camera preview activityDrawable
getTorchImageOffDrawable()
Drawable used for torch button when torch is offDrawable
getTorchImageOnDrawable()
Drawable used for torch button when torch is onjava.util.HashMap<CustomizationFont,Typeface>
getTypeFaces()
JSONObject
getUiCustomizationLayer()
JSON structure defining labels and graphic elements to be added to the Camera UIboolean
isShowBackgroundMask()
if set, background will be darkened around the document detection frameboolean
isShowHelpAnimation()
if set, animation showing how to position document will be displayedboolean
isShowNextPageAnimation()
if set, expecting page turn animation will be shownboolean
isShowResultStatusMessages()
If set, current status messages will be displayed during the document detectionboolean
isShowStatusMessages()
if set, help messages will be displayed during the document detection
-
-
-
Method Detail
-
getStatus
public java.lang.String getStatus()
Message displayed on the status label next to frame
-
getResultStatus
public java.lang.String getResultStatus()
Message displayed on the result status label next to frame
-
isShowStatusMessages
public boolean isShowStatusMessages()
if set, help messages will be displayed during the document detection
-
isShowResultStatusMessages
public boolean isShowResultStatusMessages()
If set, current status messages will be displayed during the document detection
-
isShowHelpAnimation
public boolean isShowHelpAnimation()
if set, animation showing how to position document will be displayed
-
getCameraFrameBorderWidth
public java.lang.Integer getCameraFrameBorderWidth()
Thickness of document bounds border on the video preview (dp)
-
getCameraFrameDefaultColor
public java.lang.String getCameraFrameDefaultColor()
Hex string of document bounds border color in default state
-
getCameraFrameActiveColor
public java.lang.String getCameraFrameActiveColor()
Hex string of document bounds border color in document detected state
-
getStatusTextFont
public Typeface getStatusTextFont()
Typeface of main text status
-
getStatusTextSize
public java.lang.Integer getStatusTextSize()
Size of main text status (sp)
-
getStatusTextColor
public java.lang.String getStatusTextColor()
Hex string of main text status color
-
getStatusBackgroundColor
public java.lang.String getStatusBackgroundColor()
Hex string of main text status background color
-
getCameraFrameShapeType
public java.lang.Integer getCameraFrameShapeType()
Defines the shape of document bounds border- Returns:
- one of
FrameShapeType
-
getCameraFrameLineLength
public java.lang.Integer getCameraFrameLineLength()
Defines the length (dp) of the corner side in shape mode FrameShapeType.CORNER
-
getResultStatusTextFont
public Typeface getResultStatusTextFont()
Typeface of current text status
-
getResultStatusTextSize
public java.lang.Integer getResultStatusTextSize()
Size of current text status (sp)
-
getResultStatusTextColor
public java.lang.String getResultStatusTextColor()
Hex string of current text status color
-
getResultStatusBackgroundColor
public java.lang.String getResultStatusBackgroundColor()
Hex string of current text status background color
-
getMultipageButtonBackgroundColor
public java.lang.String getMultipageButtonBackgroundColor()
Hex string of page skipping button background
-
getTintColor
public java.lang.String getTintColor()
Hex string of visual elements color (one for all)
-
getActivityIndicatorColor
public java.lang.String getActivityIndicatorColor()
Hex string of loading indicator(s) color
-
getActivityIndicatorSize
public java.lang.Integer getActivityIndicatorSize()
width and height of loading indicator(s)
-
isShowNextPageAnimation
public boolean isShowNextPageAnimation()
if set, expecting page turn animation will be shown
-
getNextPageAnimationStartDelay
public java.lang.Float getNextPageAnimationStartDelay()
Animation delay before flip, 0 - is default value
-
getNextPageAnimationEndDelay
public java.lang.Float getNextPageAnimationEndDelay()
Animation delay after flip, 0 - is default value
-
isShowBackgroundMask
public boolean isShowBackgroundMask()
if set, background will be darkened around the document detection frame
-
getHologramAnimationImage
@Deprecated public Drawable getHologramAnimationImage()
Deprecated.Drawable displayed as instruction animation, when hologram detection sequence is started usegetLivenessAnimationImage()
instead
-
getLivenessAnimationImage
public Drawable getLivenessAnimationImage()
Drawable displayed as instruction animation, when liveness detection sequence is started
-
getHologramAnimationImageScaleType
@Deprecated public ImageView.ScaleType getHologramAnimationImageScaleType()
Deprecated.To change the scaling of the image, use one of the ImageView.ScaleType members usegetLivenessAnimationImageScaleType()
instead
-
getLivenessAnimationImageScaleType
public ImageView.ScaleType getLivenessAnimationImageScaleType()
To change the scaling of the image, use one of the ImageView.ScaleType members
-
getHologramAnimationImageMatrix
@Deprecated public Matrix getHologramAnimationImageMatrix()
Deprecated.MATRIX used to scale hologram instructional animation image Is used only whengetHologramAnimationImageScaleType()
is set to ImageView.ScaleType#MATRIX usegetLivenessAnimationImageMatrix()
} instead
-
getLivenessAnimationImageMatrix
public Matrix getLivenessAnimationImageMatrix()
MATRIX used to scale liveness instructional animation image Is used only whengetHologramAnimationImageScaleType()
is set to ImageView.ScaleType#MATRIX
-
getHelpAnimationImageDrawable
public Drawable getHelpAnimationImageDrawable()
Drawable displayed as instruction animation on scanning process start
-
getHelpAnimationImageScaleType
public ImageView.ScaleType getHelpAnimationImageScaleType()
To change the scaling of the image, use one of the ImageView.ScaleType members
-
getHelpAnimationImageMatrix
public Matrix getHelpAnimationImageMatrix()
MATRIX used to scale scanning instructional animation image Is used only when #getHelpAnimationImageScaleType() is set to ImageView.ScaleType#MATRIX
-
getUiCustomizationLayer
public JSONObject getUiCustomizationLayer()
JSON structure defining labels and graphic elements to be added to the Camera UI- See Also:
- Documentation
-
getMultipageAnimationFrontImage
public Drawable getMultipageAnimationFrontImage()
Drawable displayed during as first image on page turn hint animation
-
getMultipageAnimationFrontImageScaleType
public ImageView.ScaleType getMultipageAnimationFrontImageScaleType()
To change the scaling of the image, use one of the ImageView.ScaleType members
-
getMultipageAnimationFrontImageMatrix
public Matrix getMultipageAnimationFrontImageMatrix()
MATRIX used to scale page turn animation first image Is used only whengetHelpAnimationImageScaleType()
is set to ImageView.ScaleType#MATRIX
-
getMultipageAnimationBackImage
public Drawable getMultipageAnimationBackImage()
Drawable displayed during as second image on page turn hint animation
-
getMultipageAnimationBackImageScaleType
public ImageView.ScaleType getMultipageAnimationBackImageScaleType()
To change the scaling of the image, use one of the ImageView.ScaleType members
-
getMultipageAnimationBackImageMatrix
public Matrix getMultipageAnimationBackImageMatrix()
MATRIX used to scale page turn animation second image Is used only whengetMultipageAnimationBackImageScaleType()
is set to ImageView.ScaleType#MATRIX
-
getStatusPositionMultiplier
public java.lang.Float getStatusPositionMultiplier()
You can change the location of the status message. For example, if you set the multiplier to 0.5 and the number of pixels by vertical is equal to 800, your message will be centralized and located at 200 px from top, that is (800 / 2) * 0.5 = 200 px. If the multiplier is equal to 1, the message will be centered. If the multiplier is equal to zero, the default location will be used
-
getResultStatusPositionMultiplier
public java.lang.Float getResultStatusPositionMultiplier()
-
getBorderBackgroundImage
public Drawable getBorderBackgroundImage()
Drawable displayed within the camera frame
-
getBorderBackgroundImageMatrix
public Matrix getBorderBackgroundImageMatrix()
MATRIX used to scale border image Is used only whengetBorderBackgroundImageScaleType()
is set to ImageView.ScaleType#MATRIX
-
getBorderBackgroundImageScaleType
public ImageView.ScaleType getBorderBackgroundImageScaleType()
To change the scaling of the image, use one of the ImageView.ScaleType members
-
getBackgroundMaskAlpha
public java.lang.Float getBackgroundMaskAlpha()
Value representing transparency of the overlay mask around the camera frame. Float value in range from 0 to 1, where 0 is fully transparent
-
getCameraFrameOffsetWidth
public java.lang.Integer getCameraFrameOffsetWidth()
Value in pixels the camera frame with will be decreased for
-
getCustomLabelStatus
public SpannableString getCustomLabelStatus()
Additional message displayed on the status label next to frame
-
getCustomStatusPositionMultiplier
public java.lang.Float getCustomStatusPositionMultiplier()
-
getHologramAnimationPositionMultiplier
@Deprecated public java.lang.Float getHologramAnimationPositionMultiplier()
Deprecated.Change the position of hologram detection help animation. usegetLivenessAnimationPositionMultiplier()
instead
-
getLivenessAnimationPositionMultiplier
public java.lang.Float getLivenessAnimationPositionMultiplier()
Change the position of liveness detection help animation.
-
getCameraFrameVerticalPositionMultiplier
public java.lang.Float getCameraFrameVerticalPositionMultiplier()
Change the vertical position of the camera frame.
-
getCameraFrameLandscapeAspectRatio
public java.lang.Float getCameraFrameLandscapeAspectRatio()
Width / Height ratio applied to the camera frame in landscape orientation view
-
getCameraFramePortraitAspectRatio
public java.lang.Float getCameraFramePortraitAspectRatio()
Width / Height ratio applied to the camera frame in portrait orientation view
-
getCameraFrameCornerRadius
public java.lang.Float getCameraFrameCornerRadius()
Value in pixels representing the camera frame rectangle corner radius, 0 - no radius
-
getCameraFrameLineCap
public Paint.Cap getCameraFrameLineCap()
This option specifies the treatment for the beginning and ending of stroked line in the camera frame. One of Paint.Cap values
-
getTorchImageOnDrawable
public Drawable getTorchImageOnDrawable()
Drawable used for torch button when torch is on
-
getTorchImageOffDrawable
public Drawable getTorchImageOffDrawable()
Drawable used for torch button when torch is off
-
getCloseButtonDrawable
public Drawable getCloseButtonDrawable()
Drawable used for close button
-
getCaptureButtonDrawable
public Drawable getCaptureButtonDrawable()
Drawable used for capture button
-
getChangeFrameCollapseButtonDrawable
public Drawable getChangeFrameCollapseButtonDrawable()
Drawable used for the camera frame collapse button
-
getChangeFrameExpandButtonDrawable
public Drawable getChangeFrameExpandButtonDrawable()
Drawable used for the camera frame expand button
-
getCameraSwitchButtonDrawable
public Drawable getCameraSwitchButtonDrawable()
Drawable used for camera switch button
-
getToolbarSize
public java.lang.Float getToolbarSize()
Value in pixels, representing height of the toolbar at the bottom of camera preview activity
-
getCameraPreviewBackgroundColor
public java.lang.String getCameraPreviewBackgroundColor()
-
getColors
public java.util.HashMap<CustomizationColor,java.lang.Long> getColors()
-
getFonts
public java.util.HashMap<CustomizationFont,java.lang.Integer> getFonts()
-
getFontSizes
public java.util.HashMap<CustomizationFont,java.lang.Integer> getFontSizes()
-
getTypeFaces
public java.util.HashMap<CustomizationFont,Typeface> getTypeFaces()
-
getImages
public java.util.HashMap<CustomizationImage,Drawable> getImages()
-
getBackgroundMaskColor
public java.lang.String getBackgroundMaskColor()
Hex string of current Background Mask color
-
edit
public ParamsCustomization.CustomizationEditor edit()
Create a new Editor for these preferences, through which you can make modifications to the data in the customization and atomically commit those changes back to the ParamsCustomization object. Note that you must callParamsCustomization.CustomizationEditor.apply()
to have any changes you perform in the Editor actually show up in the ParamsCustomization.- Returns:
ParamsCustomization.CustomizationEditor
instance
-
-