App developers can configure the UI Components available in OstWalletUI.
To configure the content, the sdk needs to be provided with JSON
The default configuration can be found here.
To support custom font for application, please add your font in /src/main/assets directory
Here is the small sample json
representation of the configuration.
{
"h1": {
"size": 20
}
}
In the above example:
- The first-level key
h1
corresponds to H1 Component. - The second-level key
size
is corresponds to size of H1 label.
important
- Application navigation bar logo image should be added in
assets
folder for iOS/android.- Value for
nav_bar_logo_image -> asset_name
should be updated with asset_name else OST placehoder image will be applied.- Incase of missing properties, default values will be applied to respective components.
Here, we refer follwing components as 'Label':
- H1
- H2
- H3
- H4
- C1
- C2
The following UI components properties supported by label:
Configuration Keys | Type |
---|---|
size | number |
font | string |
color | hex value(String) |
alignment | string |
system_font_weight | string |
Supported Values for alignment are:
- left
- right
- center
Supported Values for system_font_weight are:
- bold
- regular
- medium
- semi_bold
Here, we refer follwing components as 'Button':
- B1
- B2
- B3
- B4
The following UI components properties supported by button:
Configuration Keys | Type |
---|---|
size | number |
font | string |
color | hex value(String) |
background_color | hex value(String) |
system_font_weight | string |
The following UI component properties supported by EditText:
Configuration Keys | Type |
---|---|
size | number |
color | hex value(String) |
background_color | hex value(String) |
system_font_weight | string |
placeholder | JSON Object |
The following are the placeholder properties
Configuration Keys | Type |
---|---|
size | number |
color | hex value(String) |
system_font_weight | string |
To support custom fonts in ThemeConfig json, Add object with key fonts having mapping of font with font relative path from asset directory. To use custom font in component, add components with font key with value pointing to custom font mapping object. Refer below example
{
"h1": {
size: 12,
font: "Lato-Bold"
},
"fonts": {
"Lato-Bold": "font/Lato-Bold.ttf"
}
}
The following UI components properties supported by navigation bar:
Configurable component | Value to Modify |
---|---|
bar logo | nav_bar_logo_image.asset_name |
bar tint color | navigation_bar.tint_color |
bar title color | navigation_bar_header.tint_color |
close icon tint color | icons.close.tint_color |
back icon tint color | icons.back.tint_color |
back icon source | icons.back.source |
The following UI components properties supported by pin component:
Configuration Keys | Type |
---|---|
empty_color | hex value(String) |
filled_color | hex value(String) |
The following UI components properties supported by cell separator:
Configuration Keys | Type |
---|---|
color | hex value(String) |
The following UI components properties supported by link:
Configuration Keys | Type |
---|---|
size | number |
color | hex value(String) |
system_font_weight | string |
alignment | string |
The following UI components properties supported by status:
Configuration Keys | Type |
---|---|
size | number |
color | hex value(String) |
system_font_weight | string |
alignment | string |
The following UI components properties supported by status:
Configuration Keys | Type |
---|---|
size | number |
color | hex value(String) |
system_font_weight | string |
border_color | hex value(String) |
alignment | string |