UI Customization

Customize Conversation UI components in your Android app

The CustomUIDelegate allows you to customize UI components, such as the login prompt, Conversation footer, and navigation title.

2088

CustomizableViewType Reference

#CustomizableViewTypeCustomizableViewType
1Login prompt TextViewLOGIN_PROMPT_TEXT_VIEW
2Say control TextView in Pre-conversationSAY_CONTROL_IN_PRE_CONVERSATION_TEXT_VIEW
3Say control TextView in conversationSAY_CONTROL_IN_CONVERSATION_TEXT_VIEW
4Community question TextViewCOMMUNITY_QUESTION_TEXT_VIEW
5Conversation footer ViewCONVERSATION_FOOTER_VIEW
6Navigation title TextViewNAVIGATION_TITLE_TEXT_VIEW
7Community guidelines TextViewCOMMUNITY_GUIDELINES_TEXT_VIEW
8Create Comment action buttonCOMMENT_CREATION_ACTION_BUTTON
9Read only labelREAD_ONLY_TEXT_VIEW
10Empty state read only labelEMPTY_STATE_READ_ONLY_TEXT_VIEW
11Pre Conversation header title TextViewPRE_CONVERSATION_HEADER_TEXT_VIEW
12Pre Conversation header comments counter TextViewPRE_CONVERSATION_HEADER_COUNTER_TEXT_VIEW
13Show more comments buttonSHOW_COMMENTS_BUTTON


Customize UI components

Use the following steps to configure UI components:

  1. Set a CustomUIDelegate.
SpotIm.setCustomUIDelegate(object: CustomUIDelegate {
    override fun customizeView(viewType: CustomizableViewType, view: View, isDarkModeEnabled: Boolean) {
        when (viewType) {
            CustomizableViewType.LOGIN_PROMPT_TEXT_VIEW -> {
                val textView = view as? TextView
                // set your own customization
            }
      // set more customizations to another CustomizableViewType
    }
  }
}

  1. Define and customize the CustomizableViewType.