Skip to main content
This article describes two different ways to customize your React Native application UI using the React Native SDK
  • Static Resources customize the UI layout during build time.
  • Programmatic Customization modifies the layout at run time.
Note:You can combine static and programmatic approaches for customization.
To use the SDK in the most flexible way, combine the reference in this article with the React Native SDK. Sample Application: Refer to the React Native sample application for example code.

Text, Color, and Font Customization

For text-related customization, there are two types of customization, dynamic and static:
  • For dynamic customization, update the source code’s desired string, color, and font (as typeface).
JavaScript
  • For static customization, please refer to Static Resource to add or update resource files for Android and iOS respectively. To avoid the static customization being overwritten by the dynamic customization, use the undefined value for the text argument when initializing with the TextConfig() constructor, for example:
JavaScript
Please reference the UI screenshots below with each string’s mapping code, then use the mapping code to find the Key name in the Index Table A, B, C for more detail of customization support and usage for each text string.
Note:The detail of supporting scope can be found in the index table and the note column. For Android, if the app still customizes those unsupported values, it will give a WARN level log printed to logcat, filtered with CustomizeChecker for log abstraction.

New PIN Code

A1 / C1~C5

Confirm PIN Code

C6~C7

Enter PIN Code

A2 / C8~C9, C5-1, C5-2

Security Intros

A3A4 / C10C11

Security Questions Customization

Please reference the Security Question section in the SDK for how to customize the question by using setSecurityQuestions method.

A5 / C12~C25

Security Summary

A6 / C26~C32

Security Confirm

C33~C37 / B1

Recover PIN Code

A7 / C39~C47

Biometrics Prompt

C46~C60

Alert Pop Window

C61~C62

Confirm Transaction

C63~C90

Signature Request

C91~C98

Verify OTP

C99~C105

A Index Table -TextsKey

Put the configs in a map then call WalletSdk.setTextConfigsMap(). For example:
JavaScript

B Index Table - IconTextsKey

Use this Index Table to reference the dynamic special Icon, Text, Color, and Font Customization. Both the icon image and the text fields are dynamically configured together.
You can use IconTextConfig() constructor with local image or remote image URL. For example:
JavaScript
And put the configs in a map then call WalletSdk.setIconTextConfigsMap():
JavaScript

C Index Table - TextKey

For programmatic customization, put the configs in a map then call WalletSdk.setTextConfigMap(). For example:
JavaScript
For static customization, please check Static Resource.
Note:The gradientColors field is not supported for the Keys in this table. If you dynamically set the color as gradientColor, the effect will be ignored and the Android WARN level log will be printed.

Error Messages

When using this table, reference the ApiError heading in the WalletSDK section of the SDK.

Image Customization

The SDK does not contain any image resources for the SDK; you must provide the icon images from either local assets or remote URLs.
Each image has its suggested size of width and height shown in the index table’s Image view size column. Follow the suggested size to avoid the possibility of a broken layout or unexpected display.

ImageKey

D1~D9

D Index Table

Color Customization

Colors can be customized in a static way as a static string; with the UI screenshots and Key mapping index table below, the colors of each string can be defined in the colors.xml.Note that some keys are not specified in the screenshot but can be referenced from the A and C index table in the colors.xml (for Android) and color(for iOS) column.
To avoid dynamic customization, initialize a TextConfig that contains text only with no color value. For example, use a configuration with new TextConfig(key, undefined, font).
For the static resource usage, please check Android - colors.xml and iOS - CirclePWTheme.json.

New, Confirm, and Enter PIN Code

Security Intros

Security Questions

Security Summary

Security Confirm

Recover PIN Code

Biometrics PIN Protection

Contract Interaction

Confirm Transaction

Signature Request

Verify OTP

F Index Table

Text Style / Font Customization

Styles can be customized in a Static way as a static style by using the UI screenshots and Key mapping index table below. The styles of each string can be defined in the styles.xml file.
To avoid dynamic customization, initialize a TextConfig that contains text and color only. For example, use a configuration with new TextConfig(key, color, undefined).
Note:Some keys (error message) are not specified in the screenshot but can be referenced from the A and C index table at the styles.xmlfile column.
For the static resource usage, please check Android - styles.xml and iOS - CirclePWTheme.json.

G Index Table

Static Resources

This section describes how to customize the UI statically.
Android - strings.xml
The example values in the strings.xml file below can be used for Static Customization. The fields also show the default string values in the SDK if you do not set dynamic customization.
Please reference this example and add/update any desired text string in your strings.xml under the res/values folder.
XML

iOS - CirclePWLocalizable.strings

Setup

  1. Create a file CirclePWLocalizable.strings in your main bundle.
  2. Provide your strings. Partial override is supported.
Note:You can provide specific keys and values you want to override and others keys will still refer to the default values.
  1. Localization is supported. For more information, see Localization | Apple Developer Documentation.

Example CirclePWLocalizable.strings

XML

Android - colors.xml

The example values in the colors.xml file can be used for Static Customization. The fields also show the default string values in the SDK if you do not set dynamic customization.
Please reference this example and add/update any desired text color in your colors.xml under the res/values folder of the App project.
XML

Android - styles.xml

The example values in the styles.xml file can be used for Static Customization. The fields also show the default style values in the SDK if you do not set dynamic customization.
Please reference this example and add or update any desired text styles in your styles.xml file under the res/values folder of the App project.
The style can be used to define textSize and fontWeight, and it can also be used in conjunction with the static colors key defined in colors.xml, such as in the following:
XML
XML

iOS - CirclePWTheme.json

Setup

  1. Copy the file CirclePWTheme.json into your main bundle. You can use Cmd + drag and drop.
  1. Make sure you have selected the Target Membership.
  1. Provide values to set the font: To use a custom font, refer to this document: Adding a Custom Font to Your App | Apple Developer Documentation.
  2. Set the color with a hex string:

Example: CirclePWTheme.json

XML