-
public class ChatUIChatUI handles any configuration for the Chat UI elements.
-
-
Field Summary
-
Method Summary
Modifier and Type Method Description final static ChatStylegetStyle()final static UnitsetStyle(ChatStyle style)final static ChatNavigatorgetNavigator()A class responsible for handling navigation to chat destinations. final static UnitsetNavigator(ChatNavigator navigator)A class responsible for handling navigation to chat destinations. final static ImageAssetTransformergetImageAssetTransformer()Provides a custom implementation for loading images. final static UnitsetImageAssetTransformer(@Deprecated(message = Use CDN instead. Configure via ChatClient.Builder.cdn().) ImageAssetTransformer imageAssetTransformer)Provides a custom implementation for loading images. final static DownloadAttachmentUriGeneratorgetDownloadAttachmentUriGenerator()Generates a download URI for the given attachment. final static UnitsetDownloadAttachmentUriGenerator(@Deprecated(message = Use CDN instead. Configure via ChatClient.Builder.cdn().) DownloadAttachmentUriGenerator downloadAttachmentUriGenerator)Generates a download URI for the given attachment. final static DownloadRequestInterceptorgetDownloadRequestInterceptor()Intercepts and modifies the download request before it is enqueued. final static UnitsetDownloadRequestInterceptor(@Deprecated(message = Use CDN instead. Configure via ChatClient.Builder.cdn().) DownloadRequestInterceptor downloadRequestInterceptor)Intercepts and modifies the download request before it is enqueued. final static ImageHeadersProvidergetImageHeadersProvider()Provides HTTP headers for image loading requests. final static UnitsetImageHeadersProvider(@Deprecated(message = Use CDN instead. Configure via ChatClient.Builder.cdn().) ImageHeadersProvider imageHeadersProvider)Provides HTTP headers for image loading requests. final static VideoHeadersProvidergetVideoHeadersProvider()Provides HTTP headers for video loading requests. final static UnitsetVideoHeadersProvider(@Deprecated(message = Use CDN instead. Configure via ChatClient.Builder.cdn().) VideoHeadersProvider videoHeadersProvider)Provides HTTP headers for video loading requests. final static ChatFontsgetFonts()Allows setting default fonts used by UI components. final static UnitsetFonts(ChatFonts fonts)Allows setting default fonts used by UI components. final static ChatMessageTextTransformergetMessageTextTransformer()Allows customising the message text's format or style. final static UnitsetMessageTextTransformer(ChatMessageTextTransformer messageTextTransformer)Allows customising the message text's format or style. final static SupportedReactionsgetSupportedReactions()Allows overriding default set of message reactions available. final static UnitsetSupportedReactions(SupportedReactions supportedReactions)Allows overriding default set of message reactions available. final static ReactionPushEmojiFactorygetReactionPushEmojiFactory()Allows overriding default emojis for reactions in push notifications. final static UnitsetReactionPushEmojiFactory(ReactionPushEmojiFactory reactionPushEmojiFactory)Allows overriding default emojis for reactions in push notifications. final static MimeTypeIconProvidergetMimeTypeIconProvider()Allows overriding default icons for attachments MIME types. final static UnitsetMimeTypeIconProvider(MimeTypeIconProvider mimeTypeIconProvider)Allows overriding default icons for attachments MIME types. final static ChannelNameFormattergetChannelNameFormatter()Allows to generate a name for the given channel. final static UnitsetChannelNameFormatter(ChannelNameFormatter channelNameFormatter)Allows to generate a name for the given channel. final static MessagePreviewFormattergetMessagePreviewFormatter()Allows to generate a preview text for the given message. final static UnitsetMessagePreviewFormatter(MessagePreviewFormatter messagePreviewFormatter)Allows to generate a preview text for the given message. final static DateFormattergetDateFormatter()Allows formatting date-time objects as strings. final static UnitsetDateFormatter(DateFormatter dateFormatter)Allows formatting date-time objects as strings. final static DurationFormattergetDurationFormatter()Allows formatting durations as strings. final static UnitsetDurationFormatter(DurationFormatter durationFormatter)Allows formatting durations as strings. final static DecoratorProviderFactorygetDecoratorProviderFactory()Allows adding support for custom attachments in the message list. final static UnitsetDecoratorProviderFactory(DecoratorProviderFactory decoratorProviderFactory)Allows adding support for custom attachments in the message list. final static AttachmentFactoryManagergetAttachmentFactoryManager()Allows adding support for custom attachments in the message list. final static UnitsetAttachmentFactoryManager(AttachmentFactoryManager attachmentFactoryManager)Allows adding support for custom attachments in the message list. final static AttachmentPreviewFactoryManagergetAttachmentPreviewFactoryManager()Allows adding support for custom attachments in the preview section of the message composer. final static UnitsetAttachmentPreviewFactoryManager(AttachmentPreviewFactoryManager attachmentPreviewFactoryManager)Allows adding support for custom attachments in the preview section of the message composer. final static QuotedAttachmentFactoryManagergetQuotedAttachmentFactoryManager()Allows adding support for custom attachment inside quoted messages in the message list. final static UnitsetQuotedAttachmentFactoryManager(QuotedAttachmentFactoryManager quotedAttachmentFactoryManager)Allows adding support for custom attachment inside quoted messages in the message list. final static CurrentUserProvidergetCurrentUserProvider()Provides the currently logged in user. final static UnitsetCurrentUserProvider(CurrentUserProvider currentUserProvider)Provides the currently logged in user. final static BooleangetVideoThumbnailsEnabled()Whether thumbnails for video attachments will be displayed in previews. final static UnitsetVideoThumbnailsEnabled(Boolean videoThumbnailsEnabled)Whether thumbnails for video attachments will be displayed in previews. final static BooleangetDraftMessagesEnabled()Whether draft messages are enabled. final static UnitsetDraftMessagesEnabled(Boolean draftMessagesEnabled)Whether draft messages are enabled. final static BooleangetUseDocumentGView()Whether to use Google Docs Viewer (gview) for document attachments. final static UnitsetUseDocumentGView(Boolean useDocumentGView)Whether to use Google Docs Viewer (gview) for document attachments. final static StreamCdnImageResizinggetStreamCdnImageResizing()Sets the strategy for resizing images hosted on Stream's CDN. final static UnitsetStreamCdnImageResizing(@Deprecated(message = Use streamCdnImageResizer (defaults to a StreamCdnMaxPixelsImageResizer capping images to 2MP). For custom behavior, provide your own StreamCdnImageResizer. This percentage-based config has no one-token replacement — migrate manually.) StreamCdnImageResizing streamCdnImageResizing)Sets the strategy for resizing images hosted on Stream's CDN. final static StreamCdnImageResizergetStreamCdnImageResizer()Sets the strategy for resizing images hosted on Stream's CDN. final static UnitsetStreamCdnImageResizer(StreamCdnImageResizer streamCdnImageResizer)Sets the strategy for resizing images hosted on Stream's CDN. final static BooleangetAutoTranslationEnabled()Whether or not the auto-translation feature is enabled. final static UnitsetAutoTranslationEnabled(Boolean autoTranslationEnabled)Whether or not the auto-translation feature is enabled. final static BooleangetShowOriginalTranslationEnabled()Whether the option to show the original translation is enabled or not. final static UnitsetShowOriginalTranslationEnabled(Boolean showOriginalTranslationEnabled)Whether the option to show the original translation is enabled or not. final static PollsConfiggetPollsConfig()Configuration for poll creation features. final static UnitsetPollsConfig(PollsConfig pollsConfig)Configuration for poll creation features. final static UserAvatarRenderergetUserAvatarRenderer()Provides a custom renderer for user avatars. final static UnitsetUserAvatarRenderer(UserAvatarRenderer userAvatarRenderer)Provides a custom renderer for user avatars. final static ChannelAvatarRenderergetChannelAvatarRenderer()Provides a custom renderer for channel avatars. final static UnitsetChannelAvatarRenderer(ChannelAvatarRenderer channelAvatarRenderer)Provides a custom renderer for channel avatars. -
-
Method Detail
-
getNavigator
final static ChatNavigator getNavigator()
A class responsible for handling navigation to chat destinations. Allows overriding a default navigation between chat components.
-
setNavigator
final static Unit setNavigator(ChatNavigator navigator)
A class responsible for handling navigation to chat destinations. Allows overriding a default navigation between chat components.
-
getImageAssetTransformer
final static ImageAssetTransformer getImageAssetTransformer()
Provides a custom implementation for loading images.
-
setImageAssetTransformer
final static Unit setImageAssetTransformer(@Deprecated(message = Use CDN instead. Configure via ChatClient.Builder.cdn().) ImageAssetTransformer imageAssetTransformer)
Provides a custom implementation for loading images.
-
getDownloadAttachmentUriGenerator
final static DownloadAttachmentUriGenerator getDownloadAttachmentUriGenerator()
Generates a download URI for the given attachment.
-
setDownloadAttachmentUriGenerator
final static Unit setDownloadAttachmentUriGenerator(@Deprecated(message = Use CDN instead. Configure via ChatClient.Builder.cdn().) DownloadAttachmentUriGenerator downloadAttachmentUriGenerator)
Generates a download URI for the given attachment.
-
getDownloadRequestInterceptor
final static DownloadRequestInterceptor getDownloadRequestInterceptor()
Intercepts and modifies the download request before it is enqueued.
-
setDownloadRequestInterceptor
final static Unit setDownloadRequestInterceptor(@Deprecated(message = Use CDN instead. Configure via ChatClient.Builder.cdn().) DownloadRequestInterceptor downloadRequestInterceptor)
Intercepts and modifies the download request before it is enqueued.
-
getImageHeadersProvider
final static ImageHeadersProvider getImageHeadersProvider()
Provides HTTP headers for image loading requests.
-
setImageHeadersProvider
final static Unit setImageHeadersProvider(@Deprecated(message = Use CDN instead. Configure via ChatClient.Builder.cdn().) ImageHeadersProvider imageHeadersProvider)
Provides HTTP headers for image loading requests.
-
getVideoHeadersProvider
final static VideoHeadersProvider getVideoHeadersProvider()
Provides HTTP headers for video loading requests.
-
setVideoHeadersProvider
final static Unit setVideoHeadersProvider(@Deprecated(message = Use CDN instead. Configure via ChatClient.Builder.cdn().) VideoHeadersProvider videoHeadersProvider)
Provides HTTP headers for video loading requests.
-
setFonts
final static Unit setFonts(ChatFonts fonts)
Allows setting default fonts used by UI components.
-
getMessageTextTransformer
final static ChatMessageTextTransformer getMessageTextTransformer()
Allows customising the message text's format or style.
For example, it can be used to provide markdown support in chat or it can be used to highlight specific messages by making them bold etc.
-
setMessageTextTransformer
final static Unit setMessageTextTransformer(ChatMessageTextTransformer messageTextTransformer)
Allows customising the message text's format or style.
For example, it can be used to provide markdown support in chat or it can be used to highlight specific messages by making them bold etc.
-
getSupportedReactions
final static SupportedReactions getSupportedReactions()
Allows overriding default set of message reactions available.
-
setSupportedReactions
final static Unit setSupportedReactions(SupportedReactions supportedReactions)
Allows overriding default set of message reactions available.
-
getReactionPushEmojiFactory
final static ReactionPushEmojiFactory getReactionPushEmojiFactory()
Allows overriding default emojis for reactions in push notifications.
-
setReactionPushEmojiFactory
final static Unit setReactionPushEmojiFactory(ReactionPushEmojiFactory reactionPushEmojiFactory)
Allows overriding default emojis for reactions in push notifications.
-
getMimeTypeIconProvider
final static MimeTypeIconProvider getMimeTypeIconProvider()
Allows overriding default icons for attachments MIME types.
-
setMimeTypeIconProvider
final static Unit setMimeTypeIconProvider(MimeTypeIconProvider mimeTypeIconProvider)
Allows overriding default icons for attachments MIME types.
-
getChannelNameFormatter
final static ChannelNameFormatter getChannelNameFormatter()
Allows to generate a name for the given channel.
-
setChannelNameFormatter
final static Unit setChannelNameFormatter(ChannelNameFormatter channelNameFormatter)
Allows to generate a name for the given channel.
-
getMessagePreviewFormatter
final static MessagePreviewFormatter getMessagePreviewFormatter()
Allows to generate a preview text for the given message.
-
setMessagePreviewFormatter
final static Unit setMessagePreviewFormatter(MessagePreviewFormatter messagePreviewFormatter)
Allows to generate a preview text for the given message.
-
getDateFormatter
final static DateFormatter getDateFormatter()
Allows formatting date-time objects as strings.
-
setDateFormatter
final static Unit setDateFormatter(DateFormatter dateFormatter)
Allows formatting date-time objects as strings.
-
getDurationFormatter
final static DurationFormatter getDurationFormatter()
Allows formatting durations as strings.
-
setDurationFormatter
final static Unit setDurationFormatter(DurationFormatter durationFormatter)
Allows formatting durations as strings.
-
getDecoratorProviderFactory
final static DecoratorProviderFactory getDecoratorProviderFactory()
Allows adding support for custom attachments in the message list.
-
setDecoratorProviderFactory
final static Unit setDecoratorProviderFactory(DecoratorProviderFactory decoratorProviderFactory)
Allows adding support for custom attachments in the message list.
-
getAttachmentFactoryManager
final static AttachmentFactoryManager getAttachmentFactoryManager()
Allows adding support for custom attachments in the message list.
-
setAttachmentFactoryManager
final static Unit setAttachmentFactoryManager(AttachmentFactoryManager attachmentFactoryManager)
Allows adding support for custom attachments in the message list.
-
getAttachmentPreviewFactoryManager
final static AttachmentPreviewFactoryManager getAttachmentPreviewFactoryManager()
Allows adding support for custom attachments in the preview section of the message composer.
-
setAttachmentPreviewFactoryManager
final static Unit setAttachmentPreviewFactoryManager(AttachmentPreviewFactoryManager attachmentPreviewFactoryManager)
Allows adding support for custom attachments in the preview section of the message composer.
-
getQuotedAttachmentFactoryManager
final static QuotedAttachmentFactoryManager getQuotedAttachmentFactoryManager()
Allows adding support for custom attachment inside quoted messages in the message list. If none are found here will default to attachmentFactoryManager.
-
setQuotedAttachmentFactoryManager
final static Unit setQuotedAttachmentFactoryManager(QuotedAttachmentFactoryManager quotedAttachmentFactoryManager)
Allows adding support for custom attachment inside quoted messages in the message list. If none are found here will default to attachmentFactoryManager.
-
getCurrentUserProvider
final static CurrentUserProvider getCurrentUserProvider()
Provides the currently logged in user.
-
setCurrentUserProvider
final static Unit setCurrentUserProvider(CurrentUserProvider currentUserProvider)
Provides the currently logged in user.
-
getVideoThumbnailsEnabled
final static Boolean getVideoThumbnailsEnabled()
Whether thumbnails for video attachments will be displayed in previews.
-
setVideoThumbnailsEnabled
final static Unit setVideoThumbnailsEnabled(Boolean videoThumbnailsEnabled)
Whether thumbnails for video attachments will be displayed in previews.
-
getDraftMessagesEnabled
final static Boolean getDraftMessagesEnabled()
Whether draft messages are enabled.
-
setDraftMessagesEnabled
final static Unit setDraftMessagesEnabled(Boolean draftMessagesEnabled)
Whether draft messages are enabled.
-
getUseDocumentGView
final static Boolean getUseDocumentGView()
Whether to use Google Docs Viewer (gview) for document attachments.
When
true(default), documents are rendered via the legacy AttachmentDocumentActivity which loads them through Google Docs Viewer. Whenfalse, text-based files (TXT, HTML) are rendered in-app and other file types are downloaded and opened with an external application.
-
setUseDocumentGView
final static Unit setUseDocumentGView(Boolean useDocumentGView)
Whether to use Google Docs Viewer (gview) for document attachments.
When
true(default), documents are rendered via the legacy AttachmentDocumentActivity which loads them through Google Docs Viewer. Whenfalse, text-based files (TXT, HTML) are rendered in-app and other file types are downloaded and opened with an external application.
-
getStreamCdnImageResizing
final static StreamCdnImageResizing getStreamCdnImageResizing()
Sets the strategy for resizing images hosted on Stream's CDN. Disabled by default, set StreamCdnImageResizing.imageResizingEnabled to true if you wish to enable resizing images. Note that resizing applies only to images hosted on Stream's CDN which contain the original width (ow) and height (oh) query parameters.
-
setStreamCdnImageResizing
final static Unit setStreamCdnImageResizing(@Deprecated(message = Use streamCdnImageResizer (defaults to a StreamCdnMaxPixelsImageResizer capping images to 2MP). For custom behavior, provide your own StreamCdnImageResizer. This percentage-based config has no one-token replacement — migrate manually.) StreamCdnImageResizing streamCdnImageResizing)
Sets the strategy for resizing images hosted on Stream's CDN. Disabled by default, set StreamCdnImageResizing.imageResizingEnabled to true if you wish to enable resizing images. Note that resizing applies only to images hosted on Stream's CDN which contain the original width (ow) and height (oh) query parameters.
-
getStreamCdnImageResizer
final static StreamCdnImageResizer getStreamCdnImageResizer()
Sets the strategy for resizing images hosted on Stream's CDN. Defaults to a StreamCdnMaxPixelsImageResizer capping images to 2MP. Set it to NoOpStreamCdnImageResizer to disable resizing. Note that resizing applies only to images hosted on Stream's CDN which contain the original width (ow) and height (oh) query parameters.
-
setStreamCdnImageResizer
final static Unit setStreamCdnImageResizer(StreamCdnImageResizer streamCdnImageResizer)
Sets the strategy for resizing images hosted on Stream's CDN. Defaults to a StreamCdnMaxPixelsImageResizer capping images to 2MP. Set it to NoOpStreamCdnImageResizer to disable resizing. Note that resizing applies only to images hosted on Stream's CDN which contain the original width (ow) and height (oh) query parameters.
-
getAutoTranslationEnabled
final static Boolean getAutoTranslationEnabled()
Whether or not the auto-translation feature is enabled.
-
setAutoTranslationEnabled
final static Unit setAutoTranslationEnabled(Boolean autoTranslationEnabled)
Whether or not the auto-translation feature is enabled.
-
getShowOriginalTranslationEnabled
final static Boolean getShowOriginalTranslationEnabled()
Whether the option to show the original translation is enabled or not.
-
setShowOriginalTranslationEnabled
final static Unit setShowOriginalTranslationEnabled(Boolean showOriginalTranslationEnabled)
Whether the option to show the original translation is enabled or not.
-
getPollsConfig
final static PollsConfig getPollsConfig()
Configuration for poll creation features. Controls which poll features are configurable by the user and their default values.
-
setPollsConfig
final static Unit setPollsConfig(PollsConfig pollsConfig)
Configuration for poll creation features. Controls which poll features are configurable by the user and their default values.
-
getUserAvatarRenderer
final static UserAvatarRenderer getUserAvatarRenderer()
Provides a custom renderer for user avatars.
-
setUserAvatarRenderer
final static Unit setUserAvatarRenderer(UserAvatarRenderer userAvatarRenderer)
Provides a custom renderer for user avatars.
-
getChannelAvatarRenderer
final static ChannelAvatarRenderer getChannelAvatarRenderer()
Provides a custom renderer for channel avatars.
-
setChannelAvatarRenderer
final static Unit setChannelAvatarRenderer(ChannelAvatarRenderer channelAvatarRenderer)
Provides a custom renderer for channel avatars.
-
-
-
-