How to customize the Business Messaging SDK Widget UI?
Customizing the theme
Predefined themes
The SDK UI has two predefined themes: light and black.
The following methods help you apply these themes.
ZDTHEMETYPE.LIGHT
ZDTHEMETYPE.DAR
You can customize the default light and dark themes to make the SDK look more like your application.
If you want to switch the theme to dark mode, use the below method:
Kotlin
- val light: ZDTheme = ZDTheme.Builder(false).build()
Java
- ZDTheme light = new ZDTheme.Builder(false).build();
Theme Builder provides additional color customization options such as setColorAccent and setTextColorPrimary.
Kotlin
- val light: ZDTheme = ZDTheme.Builder(false).build()
val dark: ZDTheme = ZDTheme.Builder(true).build()
ZConfigUtil.setThemeBuilder(light)
Java
- ZDTheme light = new ZDTheme.Builder(false).build();
ZDTheme dark = new ZDTheme.Builder(true).build();
ZConfigUtil.setThemeBuilder(light);

Updating the SDKs theme is different from setting a theme type. Depending on the theme type you have set, the SDK will be in a dark or light theme.