Skip to content

Error View

In case any error happens in the Document Error flow and the flag showErrors is active, the Error View will appear in order to give the final user feedback as to may have gone wrong, allowing them to retry or cancel.

Document Reader Example

It contains a close button(1), a title(2), a message(3), an image(4), a retry button (5) and a background that can be customized.

The subtitle text will be the description of the error.

Branding

You can apply your own branding to our screens by overriding the resources we use.

Text resources

You can add your own texts and localization by overriding the following string resources:

<string name="feature_failure_title_sdk_enrolment">There\'s something wrong</string>
<string name="try_again_sdk_enrolment">Try again</string>

The best way to override strings is by adding your key through the Theme class for the title

Theme.shared.strings.common.failureTitle

The message field cannot be overridden at this time as it displays dynamic messages

You can override the following string keys, for the button title (It affects all error views)

Theme.shared.strings.buttons.tryAgain

Colors

You can change the text colors by overriding the following color resource (It affects all texts):

<color name="colorOverlayInvalidTxtSdkEnrolment">#1A1C1E</color>

You can change the background color by overriding the following color resource:

<color name="colorOverlayInvalidBgSdkEnrolment">#F1F0F4</color>

You can change the buttons text and background color by overriding the following color resources:

<color name="colorButtonBlueBackgroundTintSdkEnrolment">#1F5FA6</color>
<color name="colorButtonBlueTextSdkEnrolment">@android:color/white</color>

You can change the text colors by overriding the following color in Theme class

Theme.shared.colors.faceCapture.titleDark// title(2) and message(3) (It affects other screens)
You can change the background color by overriding the following color in Theme class:
Theme.shared.colors.faceCapture.background (It affects other screens)
You can change the color of the close button(1) (It affects other screens)
Theme.shared.colors.common.black
You can change the color of the button (this affects all primary style buttons)
Theme.shared.colors.button.primaryBackground
Theme.shared.colors.button.primaryTitle

Styles

You can extend the styles we use and override any properties (textColor, textSize, fontFamily, etc...) you want.

<style name="Theme.Sdk.Enrolment.TextView.Dark.Title.Centered">
<style name="Theme.Sdk.Enrolment.TextView.Dark.Subtitle.Centered">
<style name="Theme.Sdk.Enrolment.Button.Blue">
Note: It will affect every component that uses the same style.

You can change the font through the theme class (this will affect all text in the app):

Theme.shared.fonts.bold
Theme.shared.fonts.regular

Image

You can change the image by adding a drawable with this name:

ic_passport_gray.xml
The image we are using is 120x120dp.

You can change the cancel button icon by adding a drawable with this name:

ic_close.xml
The image we are using is 24x24dp.

You can change the image by adding a asset file and overriding the following image name in Theme class

Theme.shared.images.buttons.closeButton // It affects all close buttons
Theme.shared.images.documentReader.passportError