How to customize the ASAP SDK Help WIdget UI?

How to customize the ASAP SDK Android Help Widget UI?

The ASAP SDK allows you to customize the UI of the help widget as required.

Predefined themes

The SDK UI comes with two predefined themes: light and dark.


Customized themes 

You can also override the default dark and light themes to make the SDK look more like your application.

The following picture illustrates the color properties of a screen.


    I    Customize theme

You can customize the theme type in the SDK help widget using the below code:
  1. ZDPortalConfiguration.setThemeType(ZDPThemeType.SYSTEM);
ZDPThemeType.SYSTEM: By default, the system theme is selected. If you want to change the theme to light/dark mode, use the following methods:
    •    ZDPThemeType.Light: Changes the SDK add-on theme to light irrespective of the system theme.
    •    ZDPThemeType.Dark: Changes the SDK add-on theme to dark, regardless of the system theme.

    II    Customize colors in the particular theme

To customize the colors of the particular theme, please use the following method:
  1. ZDPTheme theme = new ZDPTheme.Builder(true)

            .setColorPrimary(Color.parseColor("#"))

            .setColorAccent(Color.parseColor("#"))

            .build();

    ZDPortalConfiguration.setThemeBuilder(theme);

Using custom fonts 

The SDK UI offers a set of default fonts, but you can use fonts of your choice if you need to. You can customize font typefaces to match the font typeface of your application.

To display the custom font on your SDK UI, include the following method in your app code:
  1. ZDPortalConfiguration.setFontBuilder(ZDPFont.Builder().setMedium(medium).setRegular(regular).build())