You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -612,52 +617,93 @@ Finally, as you are testing with the sandbox token, please be aware that the res
612
617
613
618
### Android
614
619
615
-
You can customize the SDK's appearance by overriding `OnfidoActivityTheme` in `app/src/main/res/values/styles.xml` or `app/src/main/res/values/themes.xml` in the `android` directory of your project. Make sure to set `OnfidoBaseActivityTheme` as the parent of `OnfidoActivityTheme` in your style definition.
620
+
Onfido SDK supports the dark theme. By default, the user's active device theme will be
621
+
automatically applied to the Onfido SDK. However, you can opt out from dynamic theme switching at run time
622
+
and instead set a theme statically at the build time. In this case, the flow will always be in displayed
623
+
in the selected theme regardless of the user's device theme. To set a static theme, use the `theme` parameter in the SDK
624
+
initialization config. The value type should be `OnfidoTheme`.
You can customize the SDK's appearance by overriding Onfido's light and dark themes (`OnfidoActivityTheme` and `OnfidoDarkTheme`)
628
+
in`app/src/main/res/values/styles.xml` or `app/src/main/res/values/themes.xml`in the `android` directory of your project.
629
+
Make sure to set `OnfidoBaseActivityTheme` as the parent of`OnfidoActivityTheme` and `OnfidoBaseDarkTheme` as the parent of`OnfidoDarkTheme`in your style definition.
* **`onfidoColorToolbarBackground` and `colorPrimary`**: Background color of the tool bar that guides the user through the flow. Both attributes need to be provided if you want to customize the tool bar across all screens in the SDK.
644
-
* **`onfidoColorToolbarBackgroundDark`**: Background color of the tool bar in screens with a dark background such as the capture screen (when overlay views are displayed)
645
-
* **`colorPrimaryDark`**: Color of the status bar (above the tool bar)
646
-
* **`onfidoColorToolbarTitle`**: Color of the tool bar's title text
647
-
***`onfidoColorToolbarTitleDark`**: Color of the tool bar's title text in screens with a dark background
648
-
* **`colorAccent`**: Accent color. Default value is blue
649
-
* **`onfidoColorButtonPrimary`**: Background color of primary buttons
650
-
* **`onfidoColorButtonPrimaryText`**: Text color of primary buttons
651
-
* **`onfidoColorButtonPrimaryPressed`**: Background color of primary buttons when pressed
652
-
* **`onfidoColorTextPrimary`**: Color of primary texts on screen
653
-
* **`onfidoColorTextSecondary`**: Color of secondary texts on screen
654
-
* **`onfidoColorTextPrimaryDark`**: Color of primary texts on dark backgrounds (in the light theme) such as Motion screens and overlay views in the capture screen
655
-
* **`onfidoFontFamilyTitle`**: Name of the font used for title texts
656
-
* **`onfidoFontFamilySubtitle`**: Name of the font used for subtitle texts
657
-
* **`onfidoFontFamilyBody`**: Name of the font used for body/content texts
658
-
* **`onfidoFontFamilyButton`**: Name of the font used in buttons
659
-
* **`onfidoFontFamilyToolbarTitle`**: Name of the font used for toolbar title texts
660
-
* **`onfidoFontFamilyDialogButton`**: Name of the font used in dialogs' buttons
649
+
*`onfidoColorToolbarBackground`: Background color of the `Toolbar` which guides the user through the flow
650
+
651
+
*`colorPrimaryDark`: Color of the status bar (with system icons) above the `Toolbar`
652
+
653
+
*`onfidoColorContentToolbarTitle`: Color of the `Toolbar`'s title text
654
+
655
+
* `onfidoColorContentMain`: Color of primary texts on screen, e.g. titles and regular body texts
656
+
657
+
* `onfidoColorContentSecondary`: Color of secondary texts on screen, e.g. subtitles
658
+
659
+
* `onfidoColorContentNegative`: Color of error texts
660
+
661
+
* `onfidoColorActionMain`: Background color of primary buttons
662
+
663
+
* `onfidoColorActionMainPressed`: Background color of primary buttons when pressed
664
+
665
+
* `onfidoColorActionMainDisabled`: Background color of primary buttons when disabled
666
+
667
+
* `onfidoColorContentOnAction`: Text color of primary buttons
668
+
669
+
* `onfidoColorContentOnActionDisabled`: Text color of primary buttons when disabled
670
+
671
+
* `onfidoColorActionSecondary`: Background color of secondary buttons
672
+
673
+
* `onfidoColorActionSecondaryPressed`: Background color of secondary buttons when pressed
674
+
675
+
* `onfidoColorActionSecondaryDisabled`: Background color of secondary buttons when disabled
676
+
677
+
* `onfidoColorContentOnActionSecondary`: Text color of secondary buttons
678
+
679
+
* `onfidoColorContentOnActionSecondaryDisabled`: Text color of secondary buttons when disabled
680
+
681
+
* `onfidoColorActionSecondaryBorder`: Border of the secondary buttons
682
+
683
+
* `onfidoColorActionSecondaryBorderDisabled`: Border of the secondary buttons when disabled
684
+
685
+
* `onfidoColorProgressTrack`: Track color of progress indicators (background color)
686
+
687
+
* `onfidoColorProgressIndicator`: Indicator color of progress indicators (foreground color)
688
+
689
+
* `colorAccent`: Defines alert dialogs' accent color, and text input fields' focused underline, cursor, and floating
690
+
label color
691
+
692
+
* `onfidoColorWatermark`: Color of the Onfido logo and co-brand logo in the footer of screens
693
+
694
+
* `onfidoColorDisclaimerBackground`: Background color of disclaimer boxes
695
+
696
+
* `onfidoColorContentDisclaimer`: Text color of disclaimer boxes
697
+
698
+
* `onfidoColorIconDisclaimer`: Icon color of disclaimer boxes
699
+
700
+
* `onfidoColorIconStroke`: Stroke color of icons
701
+
702
+
* `onfidoColorIconFill`: Fill color of icons
703
+
704
+
* `onfidoColorIconBackground`: Background color of icons
705
+
706
+
* `onfidoColorIconAccent`: Background color of accented icons
661
707
662
708
**Note:**
663
709
The usage of `color.json` and the `updateColors` command is now deprecated for Android. Please provide the theme attributes in your `styles.xml` or `themes.xml` as mentioned above.
@@ -688,12 +734,16 @@ You can customize the SDK by adding a `colors.json` file to your xcode project a
@@ -702,7 +752,7 @@ The following attributes are currently supported:
702
752
* **`onfidoPrimaryColor`**: Background color of views such as capture confirmation buttons, back navigation button, and play and pause buttons in liveness/video capture intro
703
753
* **`onfidoPrimaryButtonTextColor`**: Text color of labels included in views such as capture confirmation buttons
704
754
* **`onfidoPrimaryButtonColorPressed`**: Defines the background color of capture confirmation buttons when pressed
705
-
***`onfidoIosSupportDarkMode`**: Defines whether dark mode will be supported (true by default)
755
+
* **`interfaceStyle`**: Defines the supported interface styles ("unspecified" by default, which follows the sytem's interface style)
706
756
***`secondaryTitleColor`**: Secondary button text and border color
707
757
***`secondaryBackgroundPressedColor`**: Secondary button pressed state color
708
758
***`buttonCornerRadius`**: Border corner radius for all buttons (default value is 5.0)
@@ -711,6 +761,9 @@ The following attributes are currently supported:
711
761
712
762
You can check out the [iOS SampleApp](https://github.com/onfido/onfido-ios-sdk/tree/master/SampleApp) for example usage. When running on an iOS device, the values will be picked up dynamically at runtime.
713
763
764
+
**Note:**
765
+
The usage of`onfidoIosSupportDarkMode`in the `color.json` is now deprecated. Please use `interfaceStyle` instead.
766
+
714
767
## Going live
715
768
716
769
Once you are happy with your integration and are ready to go live, please contact [client-support@onfido.com](mailto:client-support@onfido.com) to obtain live versions of the API token and the mobile SDKtoken. You will have to replace the sandbox tokens in your code with the live tokens.
0 commit comments