Customise your conversation

The DeliveredConversationFragmentsupports various ways to customise the elements inside your conversation. You can achieve this using the methods provided by this component.

If you have not yet set up a conversation Activity please refer to the Initial setup section before continuing.

Message list background

To change the message list background color use the DeliveredConversationFragment’s setMessageListBackgroundColor() method, providing a valid color resource id as shown here:


This will produce the following result:


Message bubble color scheme

You can also change the background and text color of message bubbles. This applies to both incoming and outgoing messages. To achieve this use the DeliveredConversationFragment’s setIncomingMessageScheme() and setOutgoingMessageScheme() methods providing valid color resource ids as parameters. Each method’s first parameter corresponds to the background color of the bubble, the second one being the text color:

        ContextCompat.getColor(this, android.R.color.white));

        ContextCompat.getColor(this, android.R.color.white),

Using the previous code snippet will produce the following result:


Message text size

To change the message text size simply call the DeliveredConversationFragment’s setMessageTextSize() method providing the value of the desired text dimension (measured in sp units) as shown in the following code snippet:


Producing the following result:


Not calling the setMessageTextSize() method will result in the SDK using the default value of 18sp for the message text size.