Skip to main content

Style your SDK

Diyalog SDK provides custom Diyalog style to your application, using Diyalog style customer can create own styled screen.

How to use custom style?#

First create object of DiyalogStyle class from your application class, and using that object you can access all property of DiyaLogStyle class.

  • Diyalog style is optional. If customer don't wants to use custom style then SDK will use default style

Sample code:#

DiyalogStyle style = DiyalogEngine.diyalogInstance().style;
style.setMainColor(Color.parseColor("#139dea"));

More options?#

Followings are styles parameters with the help of those parameters User can configure style within their Application:

1. General#

  • To set Application main theme color(Theme color)
    • style.setMainColor(Color.parseColor("#f442d4"));
    • Default color theme in SDK - "#4d74a6"
    • This color is used for text and icon in an Application, if user not set any other style parameter then SDK will use theme color as a base.
  • To set custom background image in chat(conversation) screen
    • style.setDefaultBackgrouds(new int[]{im.diyalog.sdk.R.drawable.intro_background, R.drawable.img_chat_background_default, R.drawable.bg_1, R.drawable.bg_2});
    • Customer can use multiple images
    • If customer set background by using setDefaultBackground method then user can see all background images in Setting screen, by default SDK will set first image as background but customer can change from list of background from setting screen.
  • To set toolbar(Header) background color
    • style.setToolBarColor(R.color.picker_main_color);
    • By default SDK will set the color which user has defined in setMainColor method.
  • To set floating button background color based on User action as mentioned below.
    • Normal
      • style.setFabColor(Color.parseColor("#77a358"));
      • Customer can customize normal fab background color
      • Diyalog SDK change all fab background color
    • Pressed
      • style.setFabPressedColor(Color.parseColor("#a27e57"));
      • Diyalog SDK change all pressed fab background color.
  • To set screen background color when options are visible to user on click of floating button.
    • style.setMainFabbgColor(Color.parseColor("#33dd0d1e"));
    • When click on fab icon show sub items, SDK will change background color for subitems.
  • To set application background color in all screen
    • style.setMainBackgroundColor(Color.parseColor("#bcc6b8"));
  • To set place holder background color for user cover avtar Image
    • style.setAvatarBackgroundColor(Color.parseColor("#139dea"));
  • To set place holder background image for user cover avtar Image
    • style.setAvatarBackgroundResource(R.drawable.bg_1);
    • Note: If you set both color and image resource for user placeholder then SDK will accept avatar image resource as a place holder

2. Customise toolbar#

Diyalog SDK provides custom Toolbar style to your application, using this customise you can set toolbar and statusbar same as your main application.

How to use custom toolbar?#

First create object of DiyalogStyle class from your application class, and using that object you can customise toolbar.

Sample code:#
DiyalogStyle style = DiyalogEngine.diyalogInstance().style;

Following are cases in which Client can customise toolbar in sdk:

- Set gradient background for toolbar and statusbar

  • style.setGradientToolbar(R.drawable.gradient_bg);

    • Client need to create gradient drawable file into main application, and need to pass this file refrence as a configurable parameter.

- Set background color for toolbar and statusbar

  • style.setMainColor(Color.parseColor("#139dea"));

    • By default Main color of application theme will set as a toolbar & statusbar color

  • style.setStatusBarColor(Color.parseColor("#e00b52"));

    • This will change only statusbar color of sdk.

  • style.setToolBarColor(R.color.picker_main_color);

    • This will change only toolbar color of sdk.

  • Note: If you will set gradient background configuration then above configuration will not be apply effact.

3. Setting#

  • To set setting screen label and text color

    • style.setSettingsCategoryTextColor(Color.parseColor("#f28e02"));
    • By default SDK will set the color which user has defined in setMainColor method.
  • To set setting screen icon color

    • style.setSettingsIconColor(Color.parseColor("#e00b52"));
  • To set setting screen title color

    • style.setSettingsTitleColor(Color.parseColor("#5622b7"));

4. Dividers#

  • To set divider color to list in application
    • style.setDividerColor(Color.parseColor("#e00b52"));
    • This divider color will apply to whole application as divider color.

5. Text color#

  • Set primary text color
    • style.setTextPrimaryColor(Color.parseColor("#e00b52"));
  • Set secondary color
    • style.setTextSecondaryColor(Color.parseColor("#0a0ed8"));
  • Set hint color
    • style.setTextHintColor(Color.parseColor("#ede50e"));
  • Set sub header color
    • style.setTextSubHeaderColor(Color.parseColor("#f49e42"));
    • In above image see text color of label "Long press for additional options"

6. Contact screen(contact tab of main screen)#

  • set share icon and text color
    • style.setActionShareColor(Color.parseColor("#0a0ed8"));
    • By default SDK will set the color which user has defined in setMainColor method.
  • set short name(First character) text color
  • style.setContactFastTitleColor(Color.parseColor("#e00b52"));
  • By default SDK will set the color which user has defined in setMainColor method.
  • set Add contact icon and text color
    • style.setActionAddContactColor(Color.parseColor("#0a0ed8"));
    • By default SDK will set the color which user has defined in setMainColor method.
  • set list divider color
    • style.setContactDividerColor(Color.parseColor("#ede50e"));
    • if customer has not set contact divider color then it will accept default divider color which user has set in “setDividerColor” method

7. Chat screen (Chat tab from home screen)#

  • Set indicator color of sent message
    • style.setDialogsStateSentColor(Color.parseColor("#0794ed"));
  • Set indicator color of delivered message
    • style.setDialogsStateDeliveredColor(Color.parseColor("#edd607"));
  • Set indicator color of read message
    • style.setDialogsStateReadColor(Color.parseColor("#edd607"));
  • Set counter text color of unread message count
    • style.setDialogsCounterTextColor(Color.parseColor("#f48004"));
  • Set counter background color for unread message count
    • style.setDialogsCounterBackgroundColor(Color.parseColor("#120be0"));
  • Set text color for last conversation message time
    • style.setDialogsTimeColor(Color.parseColor("#c62e0f"));
  • set divider color between chat list
    • style.setDialogsDividerColor(Color.parseColor("#e0120b"));
    • By default SDK show default divider color
  • Set text color for contact name
    • style.setDialogsTitleColor(Color.parseColor("#4a8413"));
    • By default SDK show primary color
  • Set last message which is either sent or receive text color
    • style.setDialogsTextColor(Color.parseColor("#a8a579"));
    • By default SDK show main theme color
  • Set typing label text color which indicates user is typing a message.
    • style.setDialogsTypingColor(Color.parseColor("#40000000"));
    • By default SDK show main theme color
  • Set last message text color of content type media and document
    • style.setDialogsActiveTextColor(Color.parseColor("#db2a0a"));

8. Friends Profile/ Group profile#

  • Set title color of friendName and groupName text color
    • style.setProfileTitleColor(Color.parseColor("#139dea"));
  • subtitle color (Last seen text color)
    • style.setProfileSubtitleColor(Color.parseColor("#139dea"));
  • contact icon color
    • If not set then it will show default action icon color
    • style.setProfileContactIconColor (Color.parseColor("#139dea"));
  • To set action icon color(action icon like :- Add contact, new message, voice call)
    • style.setListActionColor(Color.parseColor("#db2a0a"));
    • By default SDK will set the color which user has defined in setMainColor method.
  • Small icon color
    • style.setSectonIconSmallColor(Color.parseColor("#0a0ed8"));
    • By Default color for small icon is "# b5b6b7"

9. Group profile#

  • Set admin label text color
    • If not pass then set default Accent color
    • style.setGroupAdminColor(Color.parseColor("#0cd341"));
  • set online label text color into group profile screen for members list
    • style.setGroupOnlineColor(Color.parseColor("#380249"));

10. Conversation(Chat Detail)#

  • set enable send message icon color
    • style.setConvSendEnabledColor(Color.parseColor("#0cd341"));
  • Set disable send message icon color
    • style.setConvSendDisabledColor(Color.parseColor("#db2a0a"));
  • Set date text color
    • style.setConvDatetextColor(Color.parseColor("#db0be2"));
  • Set date text background color
    • style.setConvDateBgColor(Color.parseColor("#18d8e2"));
  • Set chat message color
    • style.setConvTextColor(Color.parseColor("#db2a0a"));
  • Set chat message date color
    • style.setConvTimeColor(Color.parseColor("#0cd341"));
  • Set sent message indicator color
    • style.setConvStateSentColor(Color.parseColor("#40000000"));
  • Set delivered message indicator color
    • style.setConvStateDeliveredColor(Color.parseColor("#40000000"));
  • Set read message indicator color
    • style.setConvStateReadColor(Color.parseColor("#ff7ea8ef"));
  • Set media chat message date icon color
    • style.setConvMediaDateBgColor(Color.parseColor("#99000000"));
  • Set pending media chat message indicator color
    • style.setConvMediaStatePendingColor(Color.parseColor("#ffffff"));
  • Set sent media chat message indicator color
    • style.setConvMediaStateSentColor(Color.parseColor("#ffffff"));
  • Set deliver media chat message indicator color
    • style.setConvMediaStateDeliveredColor(Color.parseColor("#ffffff"));
  • Set read media chat message indicator color
    • style.setConvMediaStateReadColor(Color.parseColor("#ff7ea8ef"));
  • Set favorite chat message icon color
    • style.setConvLikeColor(Color.parseColor("#e2264d"));

11. OnlineHelp Screens#

  • set toolbar title color of chat and wait screens. This set all text of the onlinehelp and wait screens if they are not set indiviually.

    • style.setOnlineHelpToolBarTitleColor(Color.parseColor("#0cd341"));
  • set toolbar background color of chat and wait screens.

    • style.setOnlineHelpToolBarBackgroundColor(Color.parseColor("#0cd341"));
  • set toolbar bottom border line color of chat screen.

    • style.setOnlineHelpChatToolbarBorderColor(Color.parseColor("#0cd341"));
  • set toolbar bottom border line color of wait screen.

    • style.setOnlineHelpWaitToolbarBorderColor(Color.parseColor("#0cd341"));
  • set main background color of chat and wait screens.

    • style.setOnlineHelpBackgroundColor(Color.parseColor("#0cd341"));
  • set color of text in chat and wait screens.

    • style.setOnlineHelpTextColor(Color.parseColor("#0cd341"));
  • set back button image of chat and wait screens.

    • style.setOnlineHelpBackIcon(R.mipmap.back_icon);
  • set title image of chat screen. If it is set, title text will not show. Instead, icon or image will be shown.

    • style.setOnlineHelpToolBarTitleImage(R.drawable.brand_logo);
  • set agent avatar will be shown or not in the chat screen. Default is set as true. If you don't want to show it, you can set it to false.

    • style.setShowOnlineHelpAgentAvatar(false);
  • set avatar image of agent in chat screen. If it is not set, default agent avatar will be shown.

    • style.setOnlineHelpCustomAgentAvatarImg(R.mipmap.agent_avatar);
  • set built-in back arrow type of chat and wait screens. Options are OnlineHelpBackArrowType.white and OnlineHelpBackArrowType.blue (default).

    • style.setOnlineHelpBackArrowType(DiyalogStyle.OnlineHelpBackArrowType.white);
  • set image shown on the wait screen when an error occurs.

    • style.setOnlineHelpWaitOnErrorImage(R.drawable.wait_error);

Note: The custom chat app bar and input panel layouts (Custom Layouts) are not used on Online Help screens. Use the settings above for those screens.

Applying your style#

SDK version: The settings below are available from Diyalog Android SDK 5.14.1 (typography and custom layouts from 5.14.0). Artifact: im.diyalog:DiyalogEngine. Requirements: minSdkVersion 21 or higher, Java 17.

All style settings live on one object: DiyalogEngine.diyalogInstance().style, an instance of im.diyalog.sdk.DiyalogStyle. The SDK reads these values when it draws its screens. Apply your style in Application.onCreate(), before createDiyalog(...), so the first SDK screen the user opens already has your brand.

public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
// 1. Style (colors, typography, Online Help)
DiyalogStyleConfig.apply();
// 2. Optional custom layouts (see Custom Layouts)
DiyalogEngine engine = DiyalogEngine.diyalogInstance();
engine.setChatAppBarLayoutResId(R.layout.host_sdk_chat_appbar);
// 3. Initialize Diyalog as usual
engine.createDiyalog(this);
}
}

You can combine five ways of customizing the appearance:

SurfaceWhat you changeHow
Style colorsToolbar, status bar, chat bubbles, message states, chat list, settings, profile and moreDiyalogEngine.diyalogInstance().style (Color reference)
TypographyFont scale, font family / typeface, text style, text and hint colors for all SDK textDiyalogStyle.setTypography*() (Typography)
Online HelpOnline Help toolbar, background, text, back arrow, agent avatar and imagesDiyalogStyle.setOnlineHelp*() (OnlineHelp Screens)
Custom layoutsReplace the alert dialog, chat app bar and chat input panel with your own XMLDiyalogEngine.set*LayoutResId() (Custom Layouts)
Resource overridesSDK color resources and themesDeclare resources with the same name in your app (Overriding SDK resources)

General rules#

  • All color setters take an int color (ARGB). Use Color.parseColor("#RRGGBB") or ContextCompat.getColor(context, R.color.x).
  • Passing 0 to a color setter means "use the SDK default". Most defaults are derived from the main color, so setting only setMainColor(...) already re-brands most of the SDK.
  • Every customization is optional. If you set nothing, the SDK uses its default look.
  • Typography changes are applied each time an SDK screen resumes. Color changes are picked up the next time a screen or list item is drawn. To be safe, apply style changes before opening SDK screens.

Quick start#

This example re-brands the most visible parts of the SDK:

import android.graphics.Color;
import im.diyalog.sdk.DiyalogEngine;
import im.diyalog.sdk.DiyalogStyle;
public final class DiyalogStyleConfig {
public static void apply() {
DiyalogStyle style = DiyalogEngine.diyalogInstance().style;
// Brand
style.setMainColor(Color.parseColor("#007EE5"));
style.setMainBackgroundColor(Color.WHITE);
style.setToolBarColor(Color.parseColor("#007EE5"));
style.setStatusBarColor(Color.parseColor("#005BA6"));
// Or use a gradient drawable for the toolbar:
// style.setGradientToolbar(R.drawable.toolbar_gradient);
// Chat bubbles
style.setOwnMessageBackgroundColor(Color.parseColor("#204A91"));
style.setOwnMessageTextColor(Color.WHITE);
style.setOwnMessageTimerColor(Color.WHITE);
style.setReceivedMessageBackgroundColor(Color.parseColor("#E6F4FF"));
style.setReceivedMessageTextColor(Color.parseColor("#12375C"));
// Conversation details
style.setConvTextColor(Color.parseColor("#12375C"));
style.setConvDatetextColor(Color.parseColor("#0A0A0A"));
style.setConvDateBgColor(Color.parseColor("#EFF0F2"));
style.setConvStateReadColor(Color.parseColor("#3497F9"));
// Chat list unread badge
style.setDialogsCounterBackgroundColor(Color.parseColor("#007EE5"));
}
}

Color reference#

All setters below are on DiyalogStyle and take an int color unless stated otherwise. "Main" means the value falls back to the main color.

Brand and general#

SetterAffects
setMainColorPrimary brand color (default #4d74a6). Used as fallback by most other colors.
setMainBackgroundColorMain screen background (default white)
setBackyardBackgroundColorSecondary background behind content areas
setPrimaryAltColor, setPrimaryAltHoveredColor, setPrimaryAltPressedColorAlternative primary color and its states
setAccentColor, setAccentHoveredColor, setAccentPressedColorAccent color and its states
setToolBarColorToolbar background (default: main)
setStatusBarColorStatus bar color (default: main)
setGradientToolbar(int drawableRes)Drawable resource (e.g. a gradient) used as toolbar background
setNotificationColorNotification accent color
setFabColor, setFabPressedColor, setMainFabbgColorFloating action button
setAvatarBackgroundColorBackground behind avatar placeholders
setAvatarBackgroundResource(int drawableRes)Drawable used behind avatar placeholders

Chat screen (conversation)#

SetterAffects
setChatBackgroundColorConversation background
setDefaultBackgrouds(int[] drawableRes)Wallpaper drawables offered to the user (the method name is spelled this way)
setOwnMessageBackgroundColorOutgoing message bubble
setOwnMessageTextColorOutgoing message text
setOwnMessageTimerColorOutgoing message time
setReceivedMessageBackgroundColorIncoming message bubble
setReceivedMessageTextColorIncoming message text
setConvTextColor, setConvTimeColorGeneral conversation text and time
setConvSendEnabledColor, setConvSendDisabledColorSend button, enabled / disabled
setConvDateLineColor, setConvDatetextColor, setConvDateBgColorDate separator chips
setConvStatePendingColor, setConvStateSentColor, setConvStateDeliveredColor, setConvStateReadColor, setConvStateErrorColor, setConvStateWarrningColorMessage status ticks (the spelling "Warrning" is as in the API)
setConvMediaDateBgColorTime chip on media messages
setConvMediaStatePendingColor ... setConvMediaStateWarrningColorStatus ticks on media messages (same six states)
setConvLikeColorLike / reaction color
setSearchHighlightColorHighlight of search matches in messages
setRecordIconTintColorVoice record icon tint
setCallBackgroundColorCall screen background

Chat list (dialogs)#

SetterAffects
setDialogsTitleColorChat name
setDialogsTextColorLast message preview
setDialogsTimeColorLast message time
setDialogsTypingColor"typing..." text
setDialogsActiveTextColorHighlighted / active text
setDialogsCounterTextColor, setDialogsCounterBackgroundColorUnread badge
setDialogsDividerColorRow divider
setDialogsStatePendingColor, setDialogsStateSentColor, setDialogsStateDeliveredColor, setDialogsStateReadColor, setDialogsStateErrorColorStatus ticks in the list

Text, dividers and lists#

SetterAffects
setTextPrimaryColor, setTextSecondaryColor, setTextHintColor, setTextSubHeaderColorText on light backgrounds
setTextPrimaryInvColor, setTextSecondaryInvColor, setTextHintInvColor, setTextSubheaderInvColorText on dark / colored backgrounds (e.g. toolbar)
setDividerColor, setDividerInvColorDividers
setListActionColorAction rows in lists and settings titles
setSectonIconSmallColor, setSectionIconLargeColorSection icons (the spelling "Secton" is as in the API)

Contacts, settings, profile and groups#

SetterAffects
setContactFastTitleColor, setContactDividerColorContact list index letters and dividers
setActionAddContactColor, setActionShareColorAdd contact / share actions
setSettingsCategoryTextColor, setSettingsIconColor, setSettingsTitleColor, setSettingsSubtitleColorSettings screen
setProfileTitleColor, setProfileSubtitleColor, setProfileIconColor, setProfileContactIconColorProfile screen
setGroupAdminColor, setGroupOnlineColorGroup member labels
setGroupActionAddIconColor, setGroupActionAddTextColor"Add member" action

Typography#

Available from SDK 5.14.0. Typography settings apply to all text in SDK screens, including messages and the chat list. They are re-applied every time an SDK screen resumes, so changes made at runtime appear without restarting the app.

SetterValueDefault / reset
setTypographyFontScale(float)Multiplier for the original text size, e.g. 1.15f1.0. Values <= 0 reset to 1.0.
setTypographyFontFamily(String)System family name, e.g. "sans-serif-medium", "serif", "monospace"null \= SDK fonts (Roboto)
setTypographyTypeface(Typeface)Any Typeface, e.g. a font from res/font. Has priority over the family.null \= not used
setTypographyTextStyle(int)Typeface.NORMAL, BOLD, ITALIC, BOLD_ITALICDiyalogStyle.TYPOGRAPHY_TEXT_STYLE_KEEP (keep each view's own style)
setTypographyTextColor(int)Color applied to SDK text0 \= keep original colors
setTypographyHintTextColor(int)Color applied to input hints0 \= keep original

Example: use a brand font#

DiyalogStyle style = DiyalogEngine.diyalogInstance().style;
Typeface brand = ResourcesCompat.getFont(context, R.font.brand_regular);
style.setTypographyTypeface(brand);
style.setTypographyFontScale(1.1f);
style.setTypographyTextStyle(DiyalogStyle.TYPOGRAPHY_TEXT_STYLE_KEEP);

Example: reset typography to SDK defaults#

style.setTypographyFontScale(1.0f);
style.setTypographyTypeface((Typeface) null);
style.setTypographyFontFamily(null);
style.setTypographyTextStyle(DiyalogStyle.TYPOGRAPHY_TEXT_STYLE_KEEP);
style.setTypographyTextColor(0);
style.setTypographyHintTextColor(0);

Tip: setTypographyTextColor overrides the text colors set in the Color reference (including bubble text). Leave it at 0 if you want bubble and list colors to stay different from each other.

Custom layouts#

Available from SDK 5.14.0. You can replace three SDK UI parts with your own Android layout XML. The SDK still drives the behavior and finds your views by view id.

PartRegister withUsed in
Alert dialogsetAlertDialogLayoutResId(int) and optional setAlertDialogThemeResId(int)All SDK confirmation / info dialogs
Chat app barsetChatAppBarLayoutResId(int)Header of the chat screen
Chat input panelsetChatInputPanelLayoutResId(int)Message composer at the bottom of the chat screen
DiyalogEngine engine = DiyalogEngine.diyalogInstance();
engine.setAlertDialogThemeResId(R.style.HostAlertDialogTheme);
engine.setAlertDialogLayoutResId(R.layout.host_sdk_alert_dialog);
engine.setChatAppBarLayoutResId(R.layout.host_sdk_chat_appbar);
engine.setChatInputPanelLayoutResId(R.layout.host_sdk_chat_input_panel);
// Restore SDK defaults
engine.setChatAppBarLayoutResId(0);

Required view ids, layout skeletons and a checklist for each part are on the Custom Layouts page.

Overriding SDK resources#

Android merges library resources with app resources. If your app declares a resource with the same name as an SDK resource, your value wins. You can use this for colors that DiyalogStyle does not cover.

<!-- host app: res/values/colors.xml -->
<resources>
<color name="primary">#007EE5</color>
<color name="primaryDark">#005BA6</color>
<color name="accent">#00A3FF</color>
<color name="conv_date_bg">#EFF0F2</color>
</resources>

Main SDK color resources:

ResourceUsed for
primary, primaryDark, primary_hovered, primary_pressed, primary_textPrimary color and its states
primary_alt*, accent, accent_hovered, accent_pressedAlternative and accent colors (accent is the theme colorAccent)
action, action_hovered, action_pressedAction elements
secondary*, selector_*, selector_messages*Secondary colors and touch selectors
whatsapp_reply_accent, whatsapp_reply_accent_incomingReply preview accent strip
conv_date_bg, conv_media_date_bg, conv_online, conv_offlineChat date chip, media chip, online / offline
end_call, upload_overlayCall end button, upload overlay
picker_main_color, picker_controller_background_*Media / file picker

Important: Prefer DiyalogStyle whenever a setter exists. Many colors that used to be resources are now driven by DiyalogStyle, so overriding a resource with the same name has no effect for those. Resource names are internal and may change between SDK versions; check them after each SDK upgrade.

SDK themes (for example ChatActivityTheme, MainActivityTheme, AlertDialogStyle, PickerTheme) can also be overridden by name, but this replaces the whole theme. Copy the original definition from the SDK and change only what you need.

Other appearance options#

These are on DiyalogEngine.diyalogInstance():

MethodEffect
setAppIcon(int drawableRes)Small icon used in SDK notifications
setAppLogo(int drawableRes)App logo shown by the SDK
setShowWallpaperCategory(boolean)Show or hide the wallpaper option in settings
setShowSetting*View(boolean)Show or hide individual rows in SDK settings
setHomeBackButtonEnabled(boolean)Show the back button on the SDK home screen

Dark mode#

The SDK does not switch to a dark theme automatically (it has no values-night resources). If your app supports dark mode, set a dark palette on DiyalogStyle yourself, for example based on the current UI mode:

boolean dark = (context.getResources().getConfiguration().uiMode
& Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES;
DiyalogStyle style = DiyalogEngine.diyalogInstance().style;
if (dark) {
style.setMainBackgroundColor(Color.parseColor("#121212"));
style.setChatBackgroundColor(Color.parseColor("#121212"));
style.setReceivedMessageBackgroundColor(Color.parseColor("#2A2A2A"));
style.setReceivedMessageTextColor(Color.WHITE);
style.setTextPrimaryColor(Color.WHITE);
// ... other colors you need
}

ProGuard / R8#

No extra rules are needed. The SDK ships consumer ProGuard rules that keep DiyalogStyle (all setters, getters and enums), the DiyalogEngine.style field and all custom-layout methods.

Your custom layout XML files and their ids belong to your app. Because they are referenced from code (R.layout.*), resource shrinking keeps them.

Known limitations#

In SDK 5.14.1 the following setters exist but have no visible effect. Do not rely on them:

  • setMessageSendContainerColor, setMessageSendFrameColor, setMessageSendTextBackgroundColor, setMessageSendTextColor, setMessageSendTextHintColor. To style the composer, use a custom input panel.
  • setSettingsMainTitleColor. The settings main title uses setListActionColor.
  • setTextSecondaryAccentColor. Use setTextSecondaryColor instead.

Other limitations:

  • Custom layouts are all-or-nothing: a layout with a missing required id is ignored.
  • Custom app bar and input panel layouts are not used on Online Help screens.
  • There is no automatic dark mode (see Dark mode).

Integration checklist#

  • Style is applied in Application.onCreate() before createDiyalog(...).
  • At least setMainColor, toolbar / status bar and bubble colors are set to brand values.
  • Typography: the font loads correctly and long texts still fit at your chosen font scale.
  • Online Help: toolbar, back arrow and agent avatar match the brand.
  • Custom layouts: all required ids present with correct types; the root of the input panel is a LinearLayout.
  • Opened a 1:1 chat and a group chat; checked title, avatar, presence, typing and unread badge.
  • Sent text, attachment, reply and voice message using the custom input panel.
  • Triggered an SDK dialog (e.g. logout) and checked the custom alert.
  • Tested a release (R8-minified) build.

Troubleshooting#

SymptomLikely cause
Colors do not changeStyle set after the screen was already shown, or a resource override was used where a DiyalogStyle setter exists
A color stays the same even after setting itThe setter is in the Known limitations list
All SDK text has the same colorsetTypographyTextColor is set; reset it to 0
SDK default app bar / input panel still shownA required id is missing or has the wrong type, or the setter was called after the chat was opened
Avatar not shown in custom app baravatarPreview is not an AvatarView
Send button does not tintib_send is not a TintImageView
Attach menu / mentions overlap the inputPanel height or gravity differs from the sample; keep bottom alignment like the sample layout