Hello 👋 How can we help?

Change the color scheme of your chat widget

You can use one of our predefined themes or configure your chat appearance by yourself!
Written by Alex
Updated 2 weeks ago

HCTheme.Builder is pretty self-explanatory. To change how a chat screen looks like, you can use one of the three methods. They will return the instance of HCTheme, which you can configure in any way you want.

Default theme

HCTheme.Builder(HCTheme.DEFAULT)

Dark theme

HCTheme.Builder(HCTheme.DARK)

Custom main color theme

HCTheme.Builder(R.color.main_color, shouldPaintIconsAutomatically: true)

Example

Java:

HCTheme theme = new HCTheme.Builder(HCTheme.DEFAULT).build()

HCOptions options = new HCOptions.Builder()
        .setTheme(theme)
        .build();

HelpCrunch.showChatScreen(context, options);

Kotlin:

val theme = HCTheme.Builder(HCTheme.DEFAULT).build()

val options = HCOptions.Builder()
        .setTheme(theme)
        .build()

HelpCrunch.showChatScreen(context, options)

Did this answer your question?