Skip to main content
Version: 5.21.0

Themes

Applying themes

In the ChatCenterUI class, before calling init(...), set styles by modifying the theme or darkTheme fields. The parameters are optional. The SDK has default light-theme parameters if you do not define your own. If the dark theme is not defined, the SDK always uses the light theme.

Example:

chatCenterUI = ChatCenterUI(applicationContext).apply {
theme = chatLightTheme
darkTheme = chatDarkTheme
init(server.threadsGateProviderUid, server.appMarker, chatConfig)
}

A theme consists of two layers. The first — components (ChatComponents), the second — flows (ChatFlows). Components are a set of common styles for individual views. For example, below is a code fragment for "icon buttons" inside the SDK:

class IconButtonComponent(
internal val context: Context,
colors: ChatColors,
images: ChatImages
) {
/**
* Icon for the "back" button
*/
@DrawableRes
var backBtnImage = images.backBtn

//...

/**
* "Back" button color
*/
@ColorRes
var backButtonColor = colors.backButton

/**
* Inverted "back" button color
*/
@ColorRes
var chatToolbarInverseIconTintColor = colors.chatToolbarInverseIconTint

//...

/**
* Quote clear icon color
*/
@ColorRes
var quoteClearIconColor = colors.quoteClearIcon

}

These fields apply to all similar buttons in the app. You can override entire components in the SDK or override a specific button per-point via ChatFlows.

A chat component can be overridden either entirely or in part:

val lightChatComponents = ChatComponents(
applicationContext,
colors = lightColors,
images = lightImages
).apply {
navigationBarStyle = navigationBarStyle.copy(closeButtonEnabled = false)
}

The colors and images passed in when creating the components above are optional. You can set your own, overriding only what you need:

val lightColors = ChatColors(
main = R.color.light_main,
searchingProgressLoader = R.color.light_main,
bodyIconsTint = R.color.light_main,
incomingText = R.color.black_color,
incomingTimeText = R.color.light_time_text,
outgoingTimeText = R.color.light_time_text,
outgoingText = R.color.black_color,
incomingBubble = R.color.alt_white,
outgoingBubble = R.color.light_outgoing_bubble,
toolbarText = R.color.white_color,
messageSendingStatus = R.color.light_icons,
messageSentStatus = R.color.light_icons,
messageDeliveredStatus = R.color.light_icons,
messageReadStatus = R.color.light_icons,
messageFailedStatus = R.color.light_icons,
incomingLink = R.color.light_links,
outgoingLink = R.color.light_links,
toolbar = R.color.light_main,
statusBar = R.color.light_statusbar,
menuItem = R.color.light_main
)

When overriding the component above for the light theme, we change the back button for all screens: chat, image viewing, etc. However, if you override this button inside ChatFlows, it will have higher priority than the component.

Next, create the theme:

chatLightTheme = ChatTheme(lightChatComponents)

and set it during SDK initialization:

chatCenterUI = ChatCenterUI(applicationContext, loggerConfig).apply {
theme = chatLightTheme
darkTheme = chatDarkTheme
init(server.threadsGateProviderUid ?: "", server.appMarker ?: "", chatConf)
}

ChatFlows exposes all elements displayed in the SDK. For example, if you need to override only the "back" button per-point, do it like this:

val flows = ChatFlows(ChatComponents(applicationContext)).apply {
// change the "back" button
chatFlow.navigationBar.backButton = IconButtonChatStyle(
IconButtonColorStyle(
iconTintColor = R.color.blue_color
),
R.drawable.ic_cloud
)
// center toolbar text
chatFlow.navigationBar.centerToolbarText = true
}
chatLightTheme = ChatTheme(flows) // create a theme instance with per-point overrides
note

When defining a flow, as in the case with backButton above, you must call copy() on the existing flow (data class) and override the value in the copy, or create a new flow. Direct field assignment may not have the desired effect.

So, when creating themes, you can both define components that set styles at a lower level and override specific views with ChatFlows.

Or, for example, to override the input field hint in search:

val flows = ChatFlows(ChatComponents(applicationContext)).apply {
// ... other flow settings, if needed
searchFlow.searchBar.textInput?.placeholderText = "Search messages"
}

Example of overriding text color in all input fields via a component:

ChatTheme(
lightChatComponents.apply {
inputTextComponent.inputMessageColor = R.color.alt_blue
}
)

For more, see our demo and the dedicated section describing all public API methods.

Resources

Resource descriptions are in this section.

Infographic

This section describes chat elements and their customization via flows and components, with images.

Main chat elements

Main chat elements

1.1. Toolbar titlechatFlownavigationBartoolbarHeaderText
Component: NavigationBarStyle

1.2. Toolbar subtitlechatFlownavigationBartoolbarSubtitleText
Component: NavigationBarStyle

1.3. Formatted title (Spannable)chatFlownavigationBartoolbarSpannableHeaderText Component: NavigationBarStyle

1.4. Search iconsearchFlowsearchBarsearchIcon Component: SearchChatComponent

1.5. Navigation bar background color – chatFlow → navigationBar → backgroundColor. Component: NavigationBarStyle.

1.6. Status bar color – chatFlow → navigationBar → statusBarColor. Component: NavigationBarStyle.

1.7. Toolbar shadow visibility – chatFlow → navigationBar → visibleShadow. Component: NavigationBarStyle.

1.8. Toolbar text centering – chatFlow → navigationBar → centerToolbarText. Component: NavigationBarStyle.

1.9. "Back" button enabled – chatFlow → navigationBar → closeButtonEnabled. Component: NavigationBarStyle.

1.10. Subtitle visibility in the toolbar – chatFlow → navigationBar → chatSubtitleEnabled. Component: NavigationBarStyle.

1.11. "Back" button style – chatFlow → navigationBar → backButton. Component: NavigationBarStyle.

1.12. Search button style – chatFlow → navigationBar → searchButton. Component: NavigationBarStyle.

2.1. Image in a message – chatFlow → image. Component: ImageComponent.

2.2. Chat bubble (general style) – chatFlow → chatBubble. Component: BubbleComponent.

2.3. Message status icons – chatFlow → statusIcons. Component: MessageStatusesComponent.

3. Time text in a message with an image – chatFlow → imagesTimeText. Component: TextComponent.

4. System messages stylesystemMessagessystemMessageText. Components: TextComponent, ImageComponent.

5. Outgoing message styleoutcomeMessages.

6. Operator avatar in the chatimageFlow. Component: ImageComponent.

7. Incoming message styleincomeMessages. All components are involved.

8. Attach button – chatFlow → inputViewattachButton. Component: iconButtonComponent.

9. Message input field – chatFlow → inputView. Components: iconButtonComponent, inputTextComponent.

10.1. Message recording – chatFlow → inputViewvoiceButton. Component: iconButtonComponent.

10.2. Message sending – chatFlow → inputViewsendButton. Component: iconButtonComponent.

Behavior on message selection

Behavior on message selection

1. "Copy" button style – chatFlow → navigationBar → copyButton. Component: NavigationBarStyle.

2. "Reply with quote" button style – chatFlow → navigationBar → replyButton. Component: NavigationBarStyle.

3. Inverted "Back" button – chatFlow → navigationBar → invertedBackButton. Component: NavigationBarStyle.

4. Background color under a selected message – chatFlow → highlightingColor.

Message search field

Message search field

1. Search button style – chatFlow → navigationBar → searchButton. Component: SearchChatComponent.

2. Loader color during search – searchFlow → searchLoaderColor. Component: SearchChatComponent.

3. Input field style – searchFlow → textInput. Component: SearchChatComponent.

Found messages list

Found messages list

1. Input field clear button style – searchFlow → clearSearch. Component: SearchChatComponent.

2.1. Message author text color – searchFlow → searchResultsStylesearchResultsItemNameTextColor. Component: SearchChatComponent.

2.2. Message text color – searchFlow → searchResultsStylesearchResultsItemMessageTextColor. Component: SearchChatComponent.

2.3. Date text color – searchFlow → searchResultsStylesearchResultsItemDateTextColor. Component: SearchChatComponent.

2.4. Divider color between results – searchFlow → searchResultsStylesearchResultsDividerColor. Component: SearchChatComponent.

2.5. "Right arrow" icon – searchFlow → searchResultsStylesearchResultsItemRightArrowDrawable. Component: SearchChatComponent.

2.6. "Right arrow" icon color – searchFlow → searchResultsStylesearchResultsItemRightArrowTintColor. Component: SearchChatComponent.

2.7. No-results image – searchFlow → searchResultsStylesearchResultsNoItemsImageDrawable. Component: SearchChatComponent.

2.8. No-results text – searchFlow → searchResultsStylesearchResultsNoItemsText. Component: SearchChatComponent.

2.9. No-results text color – searchFlow → searchResultsStylesearchResultsNoItemsTextColor. Component: SearchChatComponent.

2.10. Search results background color – searchFlow → searchResultsStylebackgroundColor. Component: SearchChatComponent.

Popup message

Popup message

Popup message styleballoonsChatStyle. Styled only if the system can attach a Snackbar to a view.

Compact push

Compact push

Compact push notification stylesmallPushes. Component: PushesComponent.

Expanded push

Expanded push

Expanded push notification stylebigPushes. Component: PushesComponent.

Quick reply from a push

Quick reply from a push

1. Toolbar style – chatFlow → navigationBarStyle. Component: NavigationBarStyle.

2. Background color – chatFlow → backgroundColor. Component: ImageComponent.

3. Background color behind the input field – chatFlow → answerLayoutBackgroundColor. Component: InputTextComponent.

4. Icon for replying with a quote – chatFlow → replyIcon. Component: IconButtonComponent.

5. Icon color – chatFlow → iconColor. Component: ImageComponent.

6. Send button style – chatFlow → sendButton. Component: IconButtonComponent.

7. Operator name text style – chatFlow → consultNameText. Component: TextComponent.

8. Question text style – chatFlow → questionText. Component: TextComponent.

9. Quick-reply input field style – chatFlow → fastTextInput. Component: InputTextComponent.

Dialog termination request

Dialog termination request

1. Text – chatFlow → systemMessagesapproveRequest. Component: TextComponent.

2. Positive response button – chatFlow → systemMessagesdenyRequest. Component: TextComponent.

3. Negative response button – chatFlow → systemMessagesrequestToResolve. Component: TextComponent.

Operator feedback (stars)

Operator feedback

1. Rate invitation text – chatFlow → systemMessagesratingStyleaskForRateText. Component: TextComponent.

2. Thanks-for-rating text – chatFlow → systemMessagesratingStylethanksForRateText. Component: TextComponent.

3. Empty star icon – chatFlow → surveyStyleoptionsSurveyUnselected. Component: ImageComponent.

4. Filled star icon – chatFlow → surveyStyleoptionsSurveySelected. Component: ImageComponent.

Dialog completion survey (thumbs)

Quick replies in the chat

Rating style – chatFlow → systemMessagesratingStyle. Component: RatingComponent.

Button survey

Button survey

1. Survey button style – chatFlow → buttonSurveyButton. Component: IconButtonChatStyle.

2. Survey question text style – chatFlow → buttonSurveyQuestion. Component: TextComponent.

Quick replies in the chat

Quick replies in the chat

Quick reply button text style – chatFlow → chip. Component: TextComponent.

Outgoing file preview

Outgoing file preview

1. Quote header text styleQuoteViewStylequoteHeaderChatViewText. Component: TextComponent.

2. Quote message text styleQuoteViewStylequoteMessageChatViewText. Component: TextComponent.

3. Quote "clear" button styleQuoteViewStylequoteClearIconButton. Component: IconButtonChatStyle.

Voice file preview

Voice file preview

1. Play/pause button style – chatFlow → quotePlayPauseButton. Component: IconButtonChatStyle.

2. Voice message duration text style – chatFlow → quoteViewStylequoteDurationChatViewText. Component: TextComponent.

Messages with a file

Messages with a file
Messages with a file
Messages with a file

chatFlow → outcomeMessages / incomeMessages → see the field descriptions below:

1. File element background colorFileMessageStylebackgroundColor. Component: ImageComponent.

2. Element inner paddingspadding. Component: ImageComponent.

3. Loader styleloader. Component: LoaderChatStyle.

4. File name stylefileName. Component: TextComponent.

5. File specs stylefileSpecs. Component: TextComponent.

Message with a send error

Message with a send error

1. File upload error text – chatFlow → outcomeMessages / incomeMessagesfileMessageStyleerror.

2. Error messages style – chatFlow → errorMessageschatBubble. Component: BubbleComponent.

Image placeholder

Image placeholder

Placeholder resource for an unavailable imageimageFlowimagePlaceholderResId. Component: ImageComponent.

Progress bar on chat start

Progress bar on chat start

Progress bar on chat start – chatFlow → loader. Component: LoadingIndicatorComponent.

Error screen

Error screen

1. Chat re-initialization button – chatFlow → retryChatInitButton. Component: TextButtonComponent.

2. Chat error screen message – chatFlow → errorScreenMessage. Component: TextComponent.

3. Chat error screen image – chatFlow → errorScreenImage. Component: ImageComponent.

Welcome screen

Welcome screen

1. Welcome title style – chatFlow → welcomeScreenStylewelcomeScreenTitle. Component: TextComponent.

2. Welcome subtitle style – chatFlow → welcomeScreenStylewelcomeScreenSubtitle. Component: TextComponent.

3. Welcome image style – chatFlow → welcomeScreenStylewelcomeScreenImage. Component: ImagesChatStyle.

4. Welcome screen background color – chatFlow → welcomeScreenStylebackgroundColor. Component: ChatMainComponent.

Scroll-down button

Scroll-down button

1. Scroll button style – chatFlow → outcomeMessages / incomeMessagesscrollDownButton. Component: ImageComponent.

2. Unread sticker color – chatFlow → outcomeMessages / incomeMessagesunreadMsgStickerColor. Component: ChatMainComponent.

3. Text on the unread sticker – chatFlow → outcomeMessages / incomeMessagesunreadMessagesCount. Component: TextComponent.

Scroll-up button

Scroll-up button

1. Scroll button style – chatFlow → outcomeMessages / incomeMessagesscrollUpButton. Component: ImageComponent.

2. Top unread sticker color – chatFlow → outcomeMessages / incomeMessagesunreadMsgStickerUpColor. Component: ChatMainComponent.

3. Text on the top unread sticker – chatFlow → outcomeMessages / incomeMessagesunreadMessagesCountUp. Component: TextComponent.

ChatColors parameter reference

Below are all available ChatColors fields. Values are set as references to color resources (R.color.*).

The full categorized reference is in Design system → Colors.

FieldDescriptionDefault value
backButton"Back" button colorR.color.ecc_white
mainPrimary chat color. Used in toolbar elements, loaders, etc. where no own color is setR.color.ecc_green_83b144
searchingProgressLoaderLoader color while searching for an operatorR.color.ecc_consult_searching_progress_color
bodyIconsTintIcon color when no own color is setmain
toolbarToolbar colorR.color.ecc_chat_toolbar
toolbarContextMenu"Three dots" icon color that opens the toolbar menuR.color.ecc_chat_toolbar_context_menu
statusBarStatus bar colorR.color.ecc_chat_status_bar
menuItemMenu item text colorR.color.ecc_chat_toolbar_menu_item
toolbarTextToolbar text colorR.color.ecc_white
incomingTextIncoming message text colorR.color.ecc_black
outgoingTextOutgoing message text colorR.color.ecc_white
incomingLinkIncoming link text colorR.color.ecc_incoming_message_link
outgoingLinkOutgoing link text colorR.color.ecc_outgoing_message_link
disabledColorDisabled elements colorR.color.ecc_disabled_text_color
incomingBubbleIncoming bubble colorR.color.ecc_white
outgoingBubbleOutgoing bubble colormain
chatToolbarInverseIconTintToolbar icon color when the toolbar is inverted (e.g., on message selection)R.color.ecc_white
systemMessageSystem message colorR.color.ecc_chat_system_message
errorTextError text colorR.color.ecc_error_red_df0000
mainTextWhenErrorBubbleMain text color when error bubbleR.color.ecc_white
errorBackgroundBubble color on a message error (e.g., send failure)R.color.ecc_error_red_df0000
errorIconError icon colorR.color.ecc_white
gallerySearchTitleSearch title text color on the gallery screenR.color.ecc_white
gallerySearchSubtitleSearch subtitle text color on the gallery screenR.color.ecc_gallery_search_subtitle
galleryImageBottomNameFile name color under an imageR.color.ecc_white
mediaAndFilesTextText color in the "Files and media" section for title, file size, and timeR.color.ecc_black
quickRepliesTextQuick replies text colorR.color.ecc_black
quickReplyButtonBackgroundTintQuick reply button background tintR.color.ecc_white
incomingTimeTextTime text color in incoming messagesincomingText
outgoingTimeTextTime text color in outgoing messagesoutgoingText
incomingImageTimeBackgroundTime underlay color in incoming messagesR.color.ecc_incoming_time_background
outgoingImageTimeBackgroundTime underlay color in outgoing messagesR.color.ecc_outgoing_time_background
surveyTextSurvey text colorR.color.ecc_chat_system_message
buttonSurveyTextButtonColorButton text color in a button surveyR.color.ecc_white
surveyButtonBackgroundTintColorSurvey button background tint colormain
buttonSurveyQuestionTextColorButton survey question text colorR.color.ecc_chat_system_message
surveyChoicesTextSurvey choice text colorR.color.ecc_survey_choices_text
rateStarsCountSelected-stars count text colorR.color.ecc_chat_outgoing_message_bubble
rateTotalStarsCountAvailable-stars count text coloroutgoingText
rateFrom"of" preposition text color (3 of 5)outgoingText
rateStarStar icon coloroutgoingText
scheduleTextSchedule text colorR.color.ecc_schedule_text
unreadMessagesCountTextUnread message count text colorR.color.ecc_chat_unread_msg_count_text
quoteHeaderChatViewQuote header text colorR.color.ecc_black
quoteTextQuote text colorR.color.ecc_black
quoteClearIconQuote clear icon colormain
welcomeScreenTitleTextWelcome screen title text colorR.color.ecc_welcome_screen_title
welcomeScreenSubtitleTextWelcome screen subtitle text colorR.color.ecc_welcome_screen_subtitle
inputMessageText color for input fields, except searchR.color.ecc_black
inputMessageHintHint text color in input fields, except searchR.color.ecc_grey_aaa
inputFieldBackgroundInput field background colorR.color.ecc_white
searchTextSearch input field text colorR.color.ecc_white
searchHintSearch field hint text colorR.color.ecc_cian_b2dfdb
chatBackgroundChat window background colorR.color.ecc_chat_background
searchResultBackgroundSearch results background colorR.color.ecc_chat_background
filesAndMediaIconTintIcon color in the "Files and media" sectionR.color.ecc_green_83b144
voiceBtnBackgroundVoice recording button background colormain
voiceBtnIconColorVoice recording button colorR.color.ecc_white
sendBtnIconColorSend button icon colormain
messageSendingStatus"Sending" status icon colorR.color.ecc_white
messageSentStatus"Sent" status icon colorR.color.ecc_white
messageDeliveredStatus"Delivered" status icon colorR.color.ecc_white
messageReadStatus"Read" status icon colorR.color.ecc_white
messageFailedStatus"Error" status icon colorR.color.ecc_white
messageHighlightingBubble color when highlightedR.color.ecc_chat_highlighting
chatButtonTintColorStateListSet of colors for different button statesarrayOf(disabledColor, main, main)
chatErrorScreenButtonTextButton text color on the chat error screenR.color.ecc_white
chatErrorScreenMessageTextMessage text color on the chat error screenR.color.ecc_chat_new_system_message
chatErrorScreenImageTintImage tint color on the chat error screenmain
pushBackgroundPush notification background colorR.color.ecc_push_background
pushMessagePush notification text colorinputMessage
quotePlayPauseButtonPlay/pause button text color in a quoted messageR.color.ecc_preview_play_pause_button
imageScreenBackgroundBackground color of the full-screen image viewerR.color.ecc_attachments_background
emptyStateBackgroundBackground color when there are no chat messagesR.color.ecc_empty_state_background
separatorsChat separator colorR.color.ecc_icon_and_separators_color
unreadMsgStickerSticker color (background behind unread digits)R.color.ecc_chat_unread_msg_sticker_background
microphoneMicrophone icon colorR.color.ecc_record_button_small_mic
balloonTextText color of popup messages (Toast or Snackbar)R.color.ecc_black
balloonBackgroundBackground color of popup messages (Toast or Snackbar)R.color.ecc_white
progressButtonStartDownloadTint"Download file" button color in the initial state (download not started)bodyIconsTint
progressButtonInProgressTint"Download file" button color during downloadbodyIconsTint
progressButtonCompletedTint"Download file" button color after downloadbodyIconsTint
progressButtonBackgroundTint"Download file" button background colorR.color.ecc_progress_button_background
surveySelectedColorFilterSurvey icon color when selectedR.color.ecc_survey_selected_icon_tint
surveyUnselectedColorFilterSurvey icon color when not selectedR.color.ecc_survey_unselected_icon_tint
bottomButtonTextColorBottom chat button text color (camera, gallery, file)R.color.ecc_chat_toolbar
bottomButtonsBackgroundBottom chat button background color (camera, gallery, file)R.color.ecc_white
imagesScreenTextText color on the full-screen image viewerR.color.ecc_white
emptyFilesAndMediaTextText color when "Files and media" is emptyR.color.ecc_black
audioStatusText color of the current audio status (e.g., "processing")R.color.ecc_black
alertsTextText color on popup screens (alerts)R.color.ecc_black
loaderTextColorLoader message text colorR.color.ecc_black
buttonsDefaultTextDefault button text colorR.color.ecc_black
buttonsDefaultStrokeDefault button border colorR.color.ecc_black
searchIconSearch icon colorR.color.ecc_white
searchLoaderTintSearch icon color for the loader while loading search resultsR.color.ecc_white
searchResultsDividerDivider color between search result itemsR.color.ecc_search_divider_color
searchResultsItemRightArrowTint"Right arrow" icon color in search resultsR.color.ecc_search_results_item_secondary
searchResultsItemDateTextDate text color in search resultsR.color.ecc_search_results_item_secondary
searchResultsItemMessageTextText color of the messageR.color.ecc_search_results_message_color
searchResultsItemNameTextText color of the message authorR.color.ecc_black
searchResultNoItemsText"No results" text colorR.color.ecc_black
searchBarTextText color while entering a queryR.color.ecc_white
chatToolbarHintTextHint text color in the search input fieldR.color.ecc_chat_toolbar_hint
messageEditedStatus"Message edited" status colorR.color.ecc_message_edited_color
quoteBgColorQuote background colorR.color.ecc_quote_bg_color
quoteDelimiterColorQuote delimiter colorR.color.ecc_quote_delimiter_color
quoteAuthorColorTextQuote author text colorR.color.ecc_quote_author_color_text
quoteColorTextQuote text colorR.color.ecc_quote_color_text
quoteIconTintColorQuote icon tint colorR.color.ecc_white
infoIconInformation icon colorR.color.ecc_error_red_df0000
searchHighlightSearch highlight colormain
popupsBackgroundPopup background colorR.color.ecc_cian_b2dfdb

ChatImages parameter reference

Below are all available ChatImages fields. Values are set as references to image resources (R.drawable.*).

The full categorized reference is in Design system → Images.

FieldDescriptionDefault value
backBtn"Back" button icon in the toolbarR.drawable.ecc_ic_arrow_back_white_24dp
selectRingRing icon shown in the upper-right corner on file selection (unselected state)R.drawable.ecc_aqua_ring
loaderMain center-screen loader imageR.drawable.ecc_im_loading
attachIconFile attach iconR.drawable.ecc_ic_attachment_button
voiceBtnBackgroundVoice recording button background imageR.drawable.ecc_record_button_background
voiceBtnIconVoice recording button microphone iconR.drawable.ecc_record_button_icon
sendBtnVoice message send button iconR.drawable.ecc_ic_send_button
quoteClearBtnCancel-quote button iconR.drawable.ecc_ic_clear_36dp
clearSearchSearch input clear button iconR.drawable.ecc_ic_clear_gray_30dp
menuIconToolbar menu button iconR.drawable.ecc_ic_more_vert_24dp
downloadIconFile download button iconR.drawable.ecc_ic_file_download_white_24dp
searchIconSearch iconR.drawable.ecc_ic_search_white_24dp
playIconVoice file play iconR.drawable.ecc_voice_message_play
pauseIconVoice file pause iconR.drawable.ecc_voice_message_pause
copyIconFile copy icon (toolbar button)R.drawable.ecc_ic_content_copy_24dp
replyIconFile quote icon (toolbar button)R.drawable.ecc_ic_reply_24dp
quickReplyButtonBackgroundQuick reply button background imageR.drawable.ecc_quick_reply_button_background
surveyButtonBackgroundSurvey button backgroundR.drawable.ecc_survey_button_backround
timestampOutgoingBackgroundTimestamp background in an outgoing messageR.drawable.ecc_timestamp_outgoing_underlayer
timestampIncomingBackgroundTimestamp background in an incoming messageR.drawable.ecc_timestamp_incoming_background
chatInputBackgroundMessage input field background imageR.drawable.ecc_chat_input_background
logoImageLogo on the welcome screenR.drawable.ecc_welcome_logo
operatorAvatarPlaceholderOperator image placeholderR.drawable.ecc_operator_avatar_placeholder
imagePlaceholderImage placeholder in a messageR.drawable.ecc_image_placeholder
outgoingImageMaskOutgoing image mask (defines its shape)R.drawable.alt_ecc_outgoing_image_mask
incomingImageMaskIncoming image mask (defines its shape)R.drawable.alt_ecc_incoming_image_mask
outgoingBubbleImageOutgoing message mask (defines its shape)R.drawable.alt_ecc_outgoing_bubble
incomingBubbleImageIncoming message mask (defines its shape)R.drawable.alt_ecc_incoming_bubble
scrollDownButtonIconScroll-to-latest button iconR.drawable.ecc_scroll_down_icon
scrollDownBackgroundScroll-to-latest button backgroundR.drawable.ecc_scroll_down_background
scrollUpButtonIconScroll-up button iconR.drawable.ecc_scroll_up_icon
scrollUpBackgroundScroll-up button backgroundR.drawable.ecc_scroll_down_background
messageSending"Sending" status iconR.drawable.ecc_message_image_sending
messageSent"Sent" status iconR.drawable.ecc_message_image_sending
messageDelivered"Delivered" status iconR.drawable.ecc_message_image_delivered
messageRead"Read" status iconR.drawable.ecc_image_message_read
messageFailed"Error" status iconR.drawable.ecc_message_image_failed
rateStarSelectedFilled star icon (survey)R.drawable.ecc_options_survey_selected
rateStarUnselectedEmpty star icon (survey)R.drawable.ecc_options_survey_unselected
errorScreenImageImage shown in the center of the screen on chat load errorR.drawable.ecc_serious_worker
pushIconPush notification iconR.drawable.ecc_default_push_icon
balloonBackgroundPopup notification background (Toast and Snackbar)R.drawable.ecc_background_snackbar
progressButtonStartDownloadDownload start iconR.drawable.ecc_ic_vertical_align_bottom_18dp
progressButtonInProgressCancel download iconR.drawable.ecc_ic_clear_36dp
progressButtonCompletedDownload completed iconR.drawable.ecc_ic_file_outline_24dp
scheduleMessageIconIcon for messages with an unavailable operator due to scheduleR.drawable.ecc_schedule_icon
binarySurveyLikeUnselectedIconUnfilled thumbs up icon (survey)R.drawable.ecc_binary_survey_like_unselected
binarySurveyLikeSelectedIconFilled thumbs up icon (survey)R.drawable.ecc_binary_survey_like_selected
binarySurveyDislikeUnselectedIconUnfilled thumbs down icon (survey)R.drawable.ecc_binary_survey_dislike_unselected
binarySurveyDislikeSelectedIconFilled thumbs down icon (survey)R.drawable.ecc_binary_survey_dislike_selected
attachmentCameraIconCamera icon in the bottom chat menuR.drawable.ecc_ic_camera_42dp
attachmentGalleryIconGallery icon in the bottom chat menuR.drawable.ecc_ic_photo_42dp
attachmentFileIconFile-picker icon in the bottom chat menuR.drawable.ecc_ic_file_fill_42dp
attachmentSendIconSend icon for messages with an attachmentR.drawable.ecc_ic_send_42dp
attachmentQuoteIconAttachment quote iconR.drawable.ecc_ic_reply_gray_24dp
searchLoaderSearch icon for the loader while loading search results. Defaults to the standard loaderloader
searchResultsItemRightArrow"Right arrow" icon in search resultsR.drawable.right_arrow
searchResultNoItemsImage"No results" imageR.drawable.ecc_search_not_found
messageEditedStatusIconIcon for a message with the "edited" statusR.drawable.ecc_message_image_edited
quoteBackgroundImageQuote background imageR.drawable.ecc_quote_background
quoteIconBackgroundFile/microphone icon underlay imageR.drawable.ecc_circle_gray_48dp
quoteFileIconFile icon in attachment quotesR.drawable.ecc_ic_file_outline_24dp
quoteMicIconMicrophone icon in voice-message quotesR.drawable.ecc_ic_mic_24dp
quoteImageMaskImage mask in quotes with a pictureR.drawable.ecc_quote_image_mask
infoIconInformation iconR.drawable.ecc_info_icon

Theming priorities: ChatColors, ChatImages, Components, and Flows

The theme system is split into several levels:

  1. ChatColors / ChatImages / ChatTexts / ChatTypography
    Base value tables. Here you set global colors, images, and fonts for the entire SDK.

  2. ChatComponents
    Combines the base tables and assembles ready-made components from them (buttons, toolbar, message bubbles, loaders, etc.).
    Changes at this level affect whole groups of elements immediately.

  3. ChatFlows
    The final layer where screen and scenario styles are assembled from components (chatFlow, searchFlow, etc.).
    Convenient for per-element overrides of specific behavior (e.g., only the time of error messages).

The priority rule is simple:

  • If you change a value in ChatColors / ChatImages, it becomes the new default value for all components.
  • If you override a field in ChatComponents, it is used in all flows until the flow overrides it itself.
  • If you change styles directly in ChatFlows (as in the demo app), those have the highest priority.

Recommended customization order:

  1. First set brand colors and icons via ChatColors and ChatImages.
  2. If needed — configure components (e.g., navigationBarStyle or audioPlayer).
  3. Only for special cases (errors, particular messages, etc.) — modify ChatFlows.

Common customization scenarios

A few typical examples of appearance configuration based on the demo app.

Example 1. Your own brand colors for bubbles and toolbar

val lightColors = ChatColors(
main = R.color.my_brand_main,
incomingBubble = R.color.my_incoming_bubble,
outgoingBubble = R.color.my_outgoing_bubble,
toolbar = R.color.my_toolbar_bg,
toolbarText = R.color.my_toolbar_text,
incomingText = R.color.my_incoming_text,
outgoingText = R.color.my_outgoing_text,
)

Now all elements that use these colors by default (bubbles, toolbar, buttons) will be tinted with your brand colors.

Example 2. Replacing the logo and push notification icon

val lightImages = ChatImages(
logoImage = R.drawable.ic_my_brand_logo,
pushIcon = R.drawable.ic_my_push_icon,
)

This changes the welcome screen logo and the push icon in the status bar.

Example 3. Theme configuration via ChatComponents

val lightComponents = ChatComponents(
context = applicationContext,
colors = lightColors,
images = lightImages
).apply {
navigationBarStyle = navigationBarStyle.copy(
closeButtonEnabled = false
)
}

Here you set general component settings (for example, disable the chat close button in the toolbar).

Example 4. Per-element configuration via ChatFlows

val lightFlows = ChatFlows(lightComponents).apply {
// Change the time text color for error messages
chatFlow.outcomeMessages.timeTextWhenError =
chatFlow.outcomeMessages.timeText.copy(
textColor = R.color.my_error_time_color
)

// Change the "play" icon in quotes
chatFlow.quotePlayPauseButton = ImagesChatStyle(
imageResId = R.drawable.ic_my_play_icon,
tintColor = R.color.my_brand_main
)
}

val chatLightTheme = ChatTheme(lightFlows)

This approach mirrors the logic in EdnaChatCenterApplication.initThemes() of the demo app:
first configure components, then refine individual elements via flows as needed.