Class ParamsCustomization
java.lang.Object
com.regula.documentreader.api.params.ParamsCustomization
Structure containing parameters for UI customization on the document capture screen
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInterface used for modifyingParamsCustomizationobject. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcolorToHex(Long color) 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.voidvoidfromJson(JSONObject object) Hex string of loading indicator(s) colorChange the vertical position of the activity indicator in landscape mode.Change the vertical position of the activity indicator in portrait mode.width and height of loading indicator(s)Value representing transparency of the overlay mask around the camera frame.Hex string of background mask colorDrawableDeprecated.MatrixMATRIX used to scale border image Is used only whengetBorderBackgroundImageScaleType()is set to ImageView.ScaleType#MATRIXImageView.ScaleTypeTo change the scaling of the image, use one of the ImageView.ScaleType membersHex string of document bounds border color in document detected stateThickness of document bounds border on the video preview (dp)Value in pixels representing the camera frame rectangle corner radius, 0 - no radiusHex string of document bounds border color in default stateWidth / Height ratio applied to the camera frame in landscape orientation viewPaint.CapThis option specifies the treatment for the beginning and ending of stroked line in the camera frame.Defines the length (dp) of the corner side in shape mode FrameShapeType.CORNERValue in pixels the camera frame with will be decreased forWidth / Height ratio applied to the camera frame in portrait orientation viewDefines the shape of document bounds borderChange the vertical position of the camera frame.Hex string of camera preview background colorChange the vertical position of the camera preview.DrawableDeprecated.DrawableDeprecated.DrawableDeprecated.DrawableDeprecated.DrawableDeprecated.SpannableStringAdditional message displayed on the status label next to framegetFonts()DrawableDeprecated.MatrixMATRIX used to scale scanning instructional animation image Is used only when #getHelpAnimationImageScaleType() is set to ImageView.ScaleType#MATRIXImageView.ScaleTypeTo change the scaling of the image, use one of the ImageView.ScaleType membersDrawableDeprecated.MatrixDeprecated.ImageView.ScaleTypeDeprecated.Deprecated.DrawableDeprecated.MatrixMATRIX used to scale liveness instructional animation image Is used only whengetHologramAnimationImageScaleType()is set to ImageView.ScaleType#MATRIXImageView.ScaleTypeTo change the scaling of the image, use one of the ImageView.ScaleType membersChange the position of liveness detection help animation.HashMap<CustomizationMatrix,Matrix> DrawableDeprecated.MatrixDeprecated.ImageView.ScaleTypeDeprecated.DrawableDeprecated.MatrixDeprecated.ImageView.ScaleTypeDeprecated.Hex string of page skipping button backgroundDrawableDeprecated.Change the position of skip button.Hex string of page skipping button backgroundHex string of page skipping button text colorTypefaceTypeface of page skipping button textSize of page skipping button text (sp)Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.TypefaceDeprecated.Deprecated.HashMap<CustomizationScaleType,ImageView.ScaleType> Message displayed on the status label next to frameHex string of main text status background colorYou can change the location of the status message.Hex string of main text status colorTypefaceTypeface of main text statusSize of main text status (sp)Hex string of visual elements color (one for all)Value in pixels, representing height of the toolbar at the bottom of camera preview activityDrawableDeprecated.DrawableDeprecated.HashMap<CustomizationFont,Typeface> JSONObjectJSON structure defining labels and graphic elements to be added to the Camera UIbooleanif set, background will be darkened around the document detection framebooleanif set, animation showing how to position document will be displayedbooleanif set, expecting page turn animation will be shownbooleanDeprecated.booleanif set, help messages will be displayed during the document detectiontoJson()JSONObject
-
Constructor Details
-
ParamsCustomization
public ParamsCustomization()
-
-
Method Details
-
getStatus
Message displayed on the status label next to frame -
getResultStatus
Deprecated.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
Deprecated.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
Thickness of document bounds border on the video preview (dp) -
getCameraFrameDefaultColor
Hex string of document bounds border color in default state -
getCameraFrameActiveColor
Hex string of document bounds border color in document detected state -
getStatusTextFont
public Typeface getStatusTextFont()Typeface of main text status -
getStatusTextSize
Size of main text status (sp) -
getStatusTextColor
Hex string of main text status color -
getStatusBackgroundColor
Hex string of main text status background color -
getCameraFrameShapeType
Defines the shape of document bounds border- Returns:
- one of
FrameShapeType
-
getCameraFrameLineLength
Defines the length (dp) of the corner side in shape mode FrameShapeType.CORNER -
getResultStatusTextFont
Deprecated.Typeface of current text status -
getResultStatusTextSize
Deprecated.Size of current text status (sp) -
getResultStatusTextColor
Deprecated.Hex string of current text status color -
getResultStatusBackgroundColor
Deprecated.Hex string of current text status background color -
getMultipageButtonBackgroundColor
Hex string of page skipping button background -
getMultipageButtonText
Hex string of page skipping button background -
getMultipageButtonTextFont
public Typeface getMultipageButtonTextFont()Typeface of page skipping button text -
getMultipageButtonTextSize
Size of page skipping button text (sp) -
getMultipageButtonTextColor
Hex string of page skipping button text color -
getTintColor
Hex string of visual elements color (one for all) -
getActivityIndicatorColor
Hex string of loading indicator(s) color -
getActivityIndicatorSize
width and height of loading indicator(s) -
isShowNextPageAnimation
public boolean isShowNextPageAnimation()if set, expecting page turn animation will be shown -
getNextPageAnimationStartDelay
Deprecated.Animation delay before flip, 0 - is default value -
getNextPageAnimationEndDelay
Deprecated.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.Drawable displayed as instruction animation, when hologram detection sequence is started usegetLivenessAnimationImage()instead -
getLivenessAnimationImage
Deprecated.Drawable displayed as instruction animation, when liveness detection sequence is started -
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.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
Deprecated.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:
-
getMultipageAnimationFrontImage
Deprecated.Drawable displayed during as first image on page turn hint animation -
getMultipageAnimationFrontImageScaleType
Deprecated.To change the scaling of the image, use one of the ImageView.ScaleType members -
getMultipageAnimationFrontImageMatrix
Deprecated.MATRIX used to scale page turn animation first image Is used only whengetHelpAnimationImageScaleType()is set to ImageView.ScaleType#MATRIX -
getMultipageAnimationBackImage
Deprecated.Drawable displayed during as second image on page turn hint animation -
getMultipageAnimationBackImageScaleType
Deprecated.To change the scaling of the image, use one of the ImageView.ScaleType members -
getMultipageAnimationBackImageMatrix
Deprecated.MATRIX used to scale page turn animation second image Is used only whengetMultipageAnimationBackImageScaleType()is set to ImageView.ScaleType#MATRIX -
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
Deprecated. -
getBorderBackgroundImage
Deprecated.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
Value representing transparency of the overlay mask around the camera frame. Float value in range from 0 to 1, where 0 is fully transparent -
getBackgroundMaskColor
Hex string of background mask color -
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
-
getHologramAnimationPositionMultiplier
Deprecated.Change the position of hologram detection help animation. usegetLivenessAnimationPositionMultiplier()instead -
getLivenessAnimationPositionMultiplier
Change the position of liveness detection help animation. -
getMultipageButtonPositionMultiplier
Change the position of skip button. -
getCameraPreviewVerticalPositionMultiplier
Change the vertical position of the camera preview. -
getCameraFrameVerticalPositionMultiplier
Change the vertical position of the camera frame. -
getActivityIndicatorPortraitPositionMultiplier
Change the vertical position of the activity indicator in portrait mode. -
getActivityIndicatorLandscapePositionMultiplier
Change the vertical position of the activity indicator in landscape mode. -
getCameraFrameLandscapeAspectRatio
Width / Height ratio applied to the camera frame in landscape orientation view -
getCameraFramePortraitAspectRatio
Width / Height ratio applied to the camera frame in portrait orientation view -
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
Deprecated.Drawable used for torch button when torch is on -
getTorchImageOffDrawable
Deprecated.Drawable used for torch button when torch is off -
getCloseButtonDrawable
Deprecated.Drawable used for close button -
getMultipageButtonDrawable
Deprecated.Drawable used for multipage button -
getCaptureButtonDrawable
Deprecated.Drawable used for capture button -
getChangeFrameCollapseButtonDrawable
Deprecated.Drawable used for the camera frame collapse button. Not used for new UI -
getChangeFrameExpandButtonDrawable
Deprecated.Drawable used for the camera frame expand button. Not used for new UI -
getCameraSwitchButtonDrawable
Deprecated.Drawable used for camera switch button -
getToolbarSize
Value in pixels, representing height of the toolbar at the bottom of camera preview activity -
getCameraPreviewBackgroundColor
Hex string of camera preview background color -
getColors
-
getFonts
-
getFontSizes
-
getTypeFaces
-
getMatrices
-
getScaleTypes
-
getTimings
-
getImages
-
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.CustomizationEditorinstance
-
toJsonObject
public JSONObject toJsonObject() -
colorToHex
-
toJson
-
fromJson
-
fromJson
public void fromJson(JSONObject object)
-