How to customize the GC SDK Widget UI?

How to customize the GC SDK Widget UI?

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

The default theme is the light theme. 

Kotlin

  1. val light: ZDTheme = ZDTheme.Builder(false).build()

Java

  1. ZDTheme light = new ZDTheme.Builder(false).build();

If you want to switch the theme to dark mode, use the below method:

 

Kotlin

  1. val dark: ZDTheme = ZDTheme.Builder(true).build()

Java

  1. ZDTheme dark = new ZDTheme.Builder(true).build(); 
Theme Builder provides additional color customization options such as setColorAccent and setTextColorPrimary.

 

Kotlin

  1. val light: ZDTheme = ZDTheme.Builder(false).build()

    val dark: ZDTheme = ZDTheme.Builder(true).build()

    ZConfigUtil.setThemeBuilder(light)

Java
  1. ZDTheme light = new ZDTheme.Builder(false).build();

    ZDTheme dark = new ZDTheme.Builder(true).build();

    ZConfigUtil.setThemeBuilder(light)

Updating the SDK's theme is different from setting a theme type. The SDK will either be in a dark or light theme, based on the theme type you have set.