CUSTOMIZATION.md 2.26 KB
Newer Older
Javohir Savriy's avatar
2.1.6    
Javohir Savriy committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#### The Android SDK supports the customization of colors, buttons and strings used in the SDK flow.

- [Localization](#localization)
- [Custom Organization Details](#custom-organization-details)
- [UI customization](#ui-customization)

## Localization

The MyID Android SDK supports translations for the following languages:

- Uzbek      (uz) 🇺🇿
- English    (en) 🇬🇧
- Russian    (ru) 🇷🇺

By default, the Uzbek language is used. However, you can also call the `withLocale(Locale)`
method of the `MyIdConfig.Builder` configuration to set the language.

## Custom Organization Details

You can customize the SDK, for it to match your organization's brand book, by
providing `MyIdOrganizationDetails` object to `withOrganizationDetails` method. The object allows you to
customize following fields:

- *phoneNumber* - by default 712022202, which is MyID's call center. If you would like the customer
  to call your own call center, you can display your own phone number on the error screen, by
  providing it in this field ([sample](images/screen01.jpg)).
- *logo* - the drawable asset, that will be displayed on the input screen. If you would like to
  display your own logo on the top of the screen, this is the place to provide it. Make sure it fits
  the imageView element, which has the *240x60* size.

## UI customization

**Colors**

You can define custom colors inside your own `colors.xml` file:

* `myidColorPrimary`: Defines the color of SDK which guides the user through the flow

* `myidColorError`: Defines the color of the error buttons, icons and states

* `myidPrimaryButtonColor`: Defines the background color of the primary action buttons

* `myidPrimaryButtonColorDisabled`: Defines the background color of the primary disabled buttons

* `myidPrimaryButtonTextColor`: Defines the color of the text inside the primary action buttons

* `myidPrimaryButtonTextColorDisabled`: Defines the color of the text inside the primary disabled buttons

**Widgets**

You can customize the appearance of some widgets in your `dimens.xml` file by overriding:

* `myidButtonCornerRadius`: Defines the radius dimension of all the corners of primary buttons

#

![Screenshot](images/frame_1.jpg)
![Screenshot](images/frame_2.jpg)
![Screenshot](images/frame_3.jpg)
![Screenshot](images/frame_4.jpg)