Customizing the UI
The style of the Zendesk SDK can be set through Admin Center which currently includes the primary color, the message color and the action color.
There is additional customization support available for setting text colors through the SDK using the UserColors
API demonstrated in the code snippet below. Please note this is a temporary API which will be available until the same feature is supported in Admin Center. This API will then be deprecated.
When initializing the Zendesk SDK, different text colors can now be passed as parameters to compliment the available style colors, with support for both light and dark mode.
Kotlin
val colors = UserColors(onPrimary = Color.Black,
onMessage = Color.Black,
onAction = Color.Black)
val factory = DefaultMessagingFactory(userLightColors = colors,
userDarkColors = colors)
Zendesk.initialize(
context = this,
channelKey = "channel_key",
messagingFactory = factory,
)
Java
UserColors colors = new UserColors(Color.BLACK, Color.BLACK, Color.BLACK);
DefaultMessagingFactory factory = new DefaultMessagingFactory(colors, colors);
Zendesk.initialize(this, "channel_key", factory);