Formatters control how raw data — users, channels, messages, attachments, dates, and push payloads — are turned into the strings and styled text that appear in the UIKit’s views. Every piece of human-readable text rendered by the UIKit passes through a formatter. By replacing individual formatters onDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/sceyt/sceyt-chat-android-uikit/llms.txt
Use this file to discover all available pages before exploring further.
SceytChatUIKit.formatters, you can change display names, date patterns, notification copy, badge labels, and more, without touching any layout XML or subclassing any view.
The Formatter<T> Interface
All formatters implement the Formatter functional interface:
context— AndroidContextfor resolving strings, colors, or locale information.from— the input data object of typeT.- Return value — a
CharSequence, so you can return a plainStringor a richly-styledSpannableString.
TypedFormatter<T, R> variant is available that returns a typed R rather than CharSequence.
SceytChatUIKit.formatters
The SceytChatUIKit.formatters property holds a mutable SceytChatUIKitFormatters instance. Replace any formatter property on it to override the default behavior. Assignments should be made in Application.onCreate() before the UIKit renders its first view.
Formatter Reference
Formats the last-seen / presence date string shown beneath a user’s name (e.g., “Last seen 2 hours ago”). Default:
DefaultUserPresenceDateFormatter.Formats a user’s display name wherever their name appears (channel header, member lists, search results). Default:
DefaultUserNameFormatter.Formats an abbreviated version of the user’s name (e.g., initials or first name only). Default:
DefaultUserShortNameFormatter.Formats the name shown in the “Notes to self” channel. Default:
DefaultUserAndNotesNameFormatter.Formats the
@mention text for a user inside a message body. Default: DefaultMentionUserNameFormatter.Formats the name shown in the reaction details list. Default:
DefaultUserNameFormatter.Formats user names inside channel event messages (e.g., “Alice was added”). Default:
DefaultChannelEventUserNameFormatter.Formats the full title of a channel event message shown in the message thread. Default:
DefaultChannelEventTitleFormatter.Formats the channel event subtitle shown in the channel list row. Default:
DefaultChannelListChannelEventTitleFormatter.Formats the channel title used in the message thread header and channel info. Default:
DefaultChannelNameFormatter.Formats the subtitle line in the message thread header (e.g., “3 members”, “online”). Default:
DefaultChannelSubtitleFormatter.Formats the subtitle line within each channel list row. Default:
DefaultChannelListSubtitleFormatter.Formats the timestamp shown in the channel list row (e.g., “Mon”, “12:34”). Default:
DefaultChannelDateFormatter.channelLastMessageStatusAndDateFormatter
TypedFormatter<ChannelLastMessageStatusAndDateFormatterAttributes, ChannelLastMessageStatusAndDate>
Formats the combined delivery-status icon and date shown alongside the last message in the channel list. Returns a typed
ChannelLastMessageStatusAndDate object. Default: DefaultChannelLastMessageStatusAndDateFormatter.Formats the sender name prefix for the last message in a group channel (e.g., “Alice:”). Default:
DefaultChannelLastMessageSenderNameFormatter.Formats the body text of a message as it appears in the message thread bubble. Default:
DefaultMessageBodyFormatter.Formats the last message body displayed in the channel list subtitle (may include attachment type). Default:
DefaultMessageBodyWithAttachmentsFormatter.Formats a draft message body shown as the last message in the channel list row. Default:
DefaultDraftMessageBodyWithAttachmentsFormatter.Formats the body of the message shown in the input bar reply preview. Default:
DefaultMessageBodyWithAttachmentsFormatter.Formats the quoted body inside an already-sent reply bubble. Default:
DefaultMessageBodyWithAttachmentsFormatter.Formats the message body while it is being edited in the input bar. Default:
DefaultMessageBodyWithAttachmentsFormatter.Formats a saved draft message body. Default:
DefaultDraftMessageBodyFormatter.Formats messages with an unrecognized type. Default:
DefaultUnsupportedMessageBodyFormatter.Formats a short (single-line) version of an unsupported message body, used in previews and the channel list subtitle. Default:
DefaultUnsupportedMessageBodyFormatter.Formats the placeholder shown for a self-destructed (view-once) message after it has been opened. Default:
DefaultSelfDestructedMessageBodyFormatter.Formats system / event messages (join, leave, name changes) in the message thread. Default:
DefaultSystemMessageBodyFormatter.Formats the timestamp shown inside each message bubble. Default:
DefaultMessageDateFormatter.Formats the date label displayed in date-separator rows between message groups. Default:
DefaultMessageDateSeparatorFormatter.Formats the date shown in the message info / delivery status screen. Default:
DefaultMessageInfoDateFormatter.Formats the timestamp shown next to each read receipt marker in the message info screen. Default:
DefaultMessageMarkerDateFormatter.Formats the date label shown on attachment items in the channel info media/files/voice tabs. Default:
DefaultAttachmentDateFormatter.Formats the date separator headers between attachment groups in the channel info tabs. Default:
DefaultChannelInfoDateSeparatorFormatter.Formats the date string displayed in the full-screen media preview overlay. Default:
DefaultAttachmentDateFormatter.Formats the subtitle line shown beneath a file item in the channel info files tab (e.g., file size and date). Default:
DefaultChannelInfoFileSubtitleFormatter.Formats the subtitle line shown beneath a voice message item in the channel info voice tab. Default:
DefaultChannelInfoVoiceSubtitleFormatter.Formats the view count label displayed on broadcast messages. Default:
DefaultMessageViewCountFormatter.Formats a duration in milliseconds as a human-readable string (e.g., “1:23”) for video and audio attachments. Default:
DefaultMediaDurationFormatter.Formats a voice message duration. Default:
DefaultVoiceDurationFormatter.Formats the file name displayed for file attachments. Default:
DefaultAttachmentNameFormatter.Formats the file size label (e.g., “2.4 MB”) for file attachments. Default:
DefaultAttachmentSizeFormatter.Formats the unread badge count (e.g., turning 1000 into “999+”). Default:
DefaultUnreadCountFormatter.Formats the push notification title. Default:
DefaultNotificationTitleFormatter.Formats the push notification body text. Default:
DefaultNotificationBodyFormatter.Formats the poll type label shown in poll messages. Default:
DefaultPollTypeFormatter.Formats the vote count shown on each poll option. Default:
DefaultPollVoteCountFormatter.Formats the total vote count shown in poll results. Default:
DefaultPollResultVoteCountFormatter.Formats the date/time a vote was cast, displayed in the poll vote details screen. Default:
DefaultPollVoteTimeDateFormatter.Formats the connection-state banner text (e.g., “Connecting…”, “Reconnecting…”). Default:
DefaultConnectionsStateTitleFormatter.Formats a search result message body, typically with query highlights. Default:
DefaultSearchMessageResultBodyFormatter.Formats the sender name in a search result row. Default:
DefaultSearchMessageSenderNameFormatter.Formats the date shown in a search result row. Default:
DefaultSearchMessageDateFormatter.Replacement Examples
Display Name
Custom Date Pattern
Push Notification Body
Unread Count Badge
All formatter assignments take effect immediately for any view that has not yet been created. Already-rendered views may need to be invalidated or their adapter notified to pick up the new formatter output.