layout.xml
file.
CometChatThreadHeader
is used in threaded message views, displaying information about the parent message and its context. It provides a seamless way to navigate between the thread and the main conversation while maintaining context.
Methods | Description | Code |
---|---|---|
setParentMessage | Used to to set the message for which the replies need to be fetched | .setParentMessage(BaseMessage) |
setIncomingMessageBubbleStyle | Used to set Incoming Bubble style | .setIncomingMessageBubbleStyle(@StyleRes int) |
setOutgoingMessageBubbleStyle | Used to set Outgoing Bubble style | .setOutgoingMessageBubbleStyle(@StyleRes int) |
setReceiptsVisibility | Used to hide Receipt from Message Bubble | setReceiptsVisibility(View.GONE) |
setReplyCountVisibility | Used to hide reply count from the component | setReplyCountVisibility(View.GONE) |
setReplyCountBarVisibility | Used to hide reply count bar from component | setReplyCountBarVisibility(View.GONE) |
setAlignment | Used to set the bubble alignment: either leftAligned or standard. If set to standard, the bubble will appear on the left or right based on the message type (incoming or outgoing). If set to leftAligned, all message bubbles will appear on the left regardless of their type. | setAlignment(UIKitConstants.MessageListAlignment alignment) |
setAvatarVisibility | Shows or hides the avatar in the Thread Header. | setAvatarVisibility(true) |
setDateFormat | Sets the date pattern for displaying message dates in the Thread Header. | setDateFormat(new SimpleDateFormat("MMM dd, yyyy",Locale.getDefault())) |
setTimeFormat | Sets the date pattern for displaying message dates in the Thread Header. | setDateFormat(new SimpleDateFormat("hh:mm a",Locale.getDefault())) |
addTemplate | Adds a new message template to the existing list of templates to the Thread Header. | addTemplate(CometChatMessageTemplate template) |
setTemplates | Replace the default list of message template and sets a new list. | setTemplates(List<CometChatMessageTemplate> cometchatMessageTemplates) |
setTextFormatters | This method allows the addition of custom text formatters to the current list of formatters used in the Thread Header. | setTextFormatters(List<CometChatTextFormatter> cometchatTextFormatters) |