Class MessageListItemStyle
-
- All Implemented Interfaces:
-
io.getstream.chat.android.ui.helper.ViewStyle
public final class MessageListItemStyle implements ViewStyle
Style for view holders used inside MessageListView. Use this class together with TransformStyle.messageListItemStyleTransformer to change styles programmatically.
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description MessageListItemStyle(Integer messageBackgroundColorMine, Integer messageBackgroundColorTheirs, Integer messageLinkTextColorMine, Integer messageLinkTextColorTheirs, Integer messageLinkBackgroundColorMine, Integer messageLinkBackgroundColorTheirs, Integer linkDescriptionMaxLines, TextStyle textStyleMine, TextStyle textStyleTheirs, TextStyle textStyleUserName, TextStyle textStyleMessageDate, TextStyle textStyleMessageLanguage, TextStyle textStyleThreadCounter, TextStyle textStyleReadCounter, TextStyle threadSeparatorTextStyle, TextStyle textStyleLinkLabel, TextStyle textStyleLinkTitle, TextStyle textStyleLinkDescription, Integer dateSeparatorBackgroundColor, TextStyle textStyleDateSeparator, ViewReactionsViewStyle reactionsViewStyle, EditReactionsViewStyle editReactionsViewStyle, Drawable iconIndicatorSent, Drawable iconIndicatorRead, Drawable iconIndicatorPendingSync, Drawable iconOnlyVisibleToYou, TextStyle textStyleMessageDeleted, Integer messageDeletedBackground, TextStyle textStyleMessageDeletedMine, Integer messageDeletedBackgroundMine, TextStyle textStyleMessageDeletedTheirs, Integer messageDeletedBackgroundTheirs, Integer messageStrokeColorMine, Float messageStrokeWidthMine, Integer messageStrokeColorTheirs, Float messageStrokeWidthTheirs, TextStyle textStyleSystemMessage, TextStyle textStyleErrorMessage, TextStyle pinnedMessageIndicatorTextStyle, Drawable pinnedMessageIndicatorIcon, Integer pinnedMessageBackgroundColor, Integer messageStartMargin, Integer messageEndMargin, Float messageMaxWidthFactorMine, Float messageMaxWidthFactorTheirs, Boolean showMessageDeliveryStatusIndicator, Drawable iconFailedMessage, Drawable iconBannedMessage, Integer systemMessageAlignment, Integer loadingMoreView, Integer unreadSeparatorBackgroundColor, TextStyle unreadSeparatorTextStyle)
-
Method Summary
Modifier and Type Method Description final IntegergetMessageBackgroundColorMine()Background color for message sent by the current user. final IntegergetMessageBackgroundColorTheirs()Background color for message sent by other user. final IntegergetMessageLinkTextColorMine()Color for links sent by the current user. final IntegergetMessageLinkTextColorTheirs()Color for links sent by other user. final IntegergetMessageLinkBackgroundColorMine()Background color for message with link, sent by the current user. final IntegergetMessageLinkBackgroundColorTheirs()Background color for message with link, sent by other user. final IntegergetLinkDescriptionMaxLines()Max lines for link's description. final TextStylegetTextStyleMine()Appearance for message text sent by the current user. final TextStylegetTextStyleTheirs()Appearance for message text sent by other user. final TextStylegetTextStyleUserName()Appearance for user name text. final TextStylegetTextStyleMessageDate()Appearance for message date text. final TextStylegetTextStyleMessageLanguage()Appearance for message language text. final TextStylegetTextStyleThreadCounter()Appearance for thread counter text. final TextStylegetTextStyleReadCounter()Appearance for read counter text. final TextStylegetThreadSeparatorTextStyle()final TextStylegetTextStyleLinkLabel()final TextStylegetTextStyleLinkTitle()Appearance for link. final TextStylegetTextStyleLinkDescription()Appearance for link's description text. final IntegergetDateSeparatorBackgroundColor()Background color for data separator. final TextStylegetTextStyleDateSeparator()Appearance for date separator text. final ViewReactionsViewStylegetReactionsViewStyle()Style for ViewReactionsView. final EditReactionsViewStylegetEditReactionsViewStyle()Style for EditReactionsView. final DrawablegetIconIndicatorSent()Icon for message's sent status. final DrawablegetIconIndicatorRead()Icon for message's read status. final DrawablegetIconIndicatorPendingSync()Icon for message's pending status. final DrawablegetIconOnlyVisibleToYou()Icon for message's pending status. final TextStylegetTextStyleMessageDeleted()Appearance for message deleted text. final IntegergetMessageDeletedBackground()Background color for deleted message. final TextStylegetTextStyleMessageDeletedMine()Appearance for mine message deleted text. final IntegergetMessageDeletedBackgroundMine()Background color for mine deleted message. final TextStylegetTextStyleMessageDeletedTheirs()Appearance for theirs message deleted text. final IntegergetMessageDeletedBackgroundTheirs()Background color for theirs deleted message. final IntegergetMessageStrokeColorMine()Stroke color for message sent by the current user. final FloatgetMessageStrokeWidthMine()Stroke width for message sent by the current user. final IntegergetMessageStrokeColorTheirs()Stroke color for message sent by other user. final FloatgetMessageStrokeWidthTheirs()Stroke width for message sent by other user. final TextStylegetTextStyleSystemMessage()Appearance for system message text. final TextStylegetTextStyleErrorMessage()Appearance for error message text. final TextStylegetPinnedMessageIndicatorTextStyle()final DrawablegetPinnedMessageIndicatorIcon()final IntegergetPinnedMessageBackgroundColor()final IntegergetMessageStartMargin()Margin for messages in the left side. final IntegergetMessageEndMargin()Margin for messages in the right side. final FloatgetMessageMaxWidthFactorMine()Factor used to compute max width for message sent by the current user. final FloatgetMessageMaxWidthFactorTheirs()Factor used to compute max width for message sent by other user. final BooleangetShowMessageDeliveryStatusIndicator()Flag if we need to show the delivery indicator or not. final DrawablegetIconFailedMessage()Icon for message failed status. final DrawablegetIconBannedMessage()Icon for message when the current user is banned. final IntegergetSystemMessageAlignment()Changes the alignment of system messages. final IntegergetLoadingMoreView()Loading more view. final IntegergetUnreadSeparatorBackgroundColor()final TextStylegetUnreadSeparatorTextStyle()final IntegergetStyleTextColor(Boolean isMine)final IntegergetStyleLinkTextColor(Boolean isMine)-
-
Constructor Detail
-
MessageListItemStyle
MessageListItemStyle(Integer messageBackgroundColorMine, Integer messageBackgroundColorTheirs, Integer messageLinkTextColorMine, Integer messageLinkTextColorTheirs, Integer messageLinkBackgroundColorMine, Integer messageLinkBackgroundColorTheirs, Integer linkDescriptionMaxLines, TextStyle textStyleMine, TextStyle textStyleTheirs, TextStyle textStyleUserName, TextStyle textStyleMessageDate, TextStyle textStyleMessageLanguage, TextStyle textStyleThreadCounter, TextStyle textStyleReadCounter, TextStyle threadSeparatorTextStyle, TextStyle textStyleLinkLabel, TextStyle textStyleLinkTitle, TextStyle textStyleLinkDescription, Integer dateSeparatorBackgroundColor, TextStyle textStyleDateSeparator, ViewReactionsViewStyle reactionsViewStyle, EditReactionsViewStyle editReactionsViewStyle, Drawable iconIndicatorSent, Drawable iconIndicatorRead, Drawable iconIndicatorPendingSync, Drawable iconOnlyVisibleToYou, TextStyle textStyleMessageDeleted, Integer messageDeletedBackground, TextStyle textStyleMessageDeletedMine, Integer messageDeletedBackgroundMine, TextStyle textStyleMessageDeletedTheirs, Integer messageDeletedBackgroundTheirs, Integer messageStrokeColorMine, Float messageStrokeWidthMine, Integer messageStrokeColorTheirs, Float messageStrokeWidthTheirs, TextStyle textStyleSystemMessage, TextStyle textStyleErrorMessage, TextStyle pinnedMessageIndicatorTextStyle, Drawable pinnedMessageIndicatorIcon, Integer pinnedMessageBackgroundColor, Integer messageStartMargin, Integer messageEndMargin, Float messageMaxWidthFactorMine, Float messageMaxWidthFactorTheirs, Boolean showMessageDeliveryStatusIndicator, Drawable iconFailedMessage, Drawable iconBannedMessage, Integer systemMessageAlignment, Integer loadingMoreView, Integer unreadSeparatorBackgroundColor, TextStyle unreadSeparatorTextStyle)
-
-
Method Detail
-
getMessageBackgroundColorMine
final Integer getMessageBackgroundColorMine()
Background color for message sent by the current user. Default value is R.color.stream_ui_grey_gainsboro.
-
getMessageBackgroundColorTheirs
final Integer getMessageBackgroundColorTheirs()
Background color for message sent by other user. Default value is R.color.stream_ui_white.
-
getMessageLinkTextColorMine
final Integer getMessageLinkTextColorMine()
Color for links sent by the current user. Default value is R.color.stream_ui_accent_blue.
-
getMessageLinkTextColorTheirs
final Integer getMessageLinkTextColorTheirs()
Color for links sent by other user. Default value is R.color.stream_ui_accent_blue.
-
getMessageLinkBackgroundColorMine
final Integer getMessageLinkBackgroundColorMine()
Background color for message with link, sent by the current user. Default value is R.color.stream_ui_blue_alice.
-
getMessageLinkBackgroundColorTheirs
final Integer getMessageLinkBackgroundColorTheirs()
Background color for message with link, sent by other user. Default value is R.color.stream_ui_blue_alice.
-
getLinkDescriptionMaxLines
final Integer getLinkDescriptionMaxLines()
Max lines for link's description. Default value is 5.
-
getTextStyleMine
final TextStyle getTextStyleMine()
Appearance for message text sent by the current user.
-
getTextStyleTheirs
final TextStyle getTextStyleTheirs()
Appearance for message text sent by other user.
-
getTextStyleUserName
final TextStyle getTextStyleUserName()
Appearance for user name text.
-
getTextStyleMessageDate
final TextStyle getTextStyleMessageDate()
Appearance for message date text.
-
getTextStyleMessageLanguage
final TextStyle getTextStyleMessageLanguage()
Appearance for message language text.
-
getTextStyleThreadCounter
final TextStyle getTextStyleThreadCounter()
Appearance for thread counter text.
-
getTextStyleReadCounter
final TextStyle getTextStyleReadCounter()
Appearance for read counter text.
-
getThreadSeparatorTextStyle
final TextStyle getThreadSeparatorTextStyle()
-
getTextStyleLinkLabel
final TextStyle getTextStyleLinkLabel()
-
getTextStyleLinkTitle
final TextStyle getTextStyleLinkTitle()
Appearance for link.
-
getTextStyleLinkDescription
final TextStyle getTextStyleLinkDescription()
Appearance for link's description text.
-
getDateSeparatorBackgroundColor
final Integer getDateSeparatorBackgroundColor()
Background color for data separator. Default value is R.color.stream_ui_overlay_dark.
-
getTextStyleDateSeparator
final TextStyle getTextStyleDateSeparator()
Appearance for date separator text.
-
getReactionsViewStyle
final ViewReactionsViewStyle getReactionsViewStyle()
Style for ViewReactionsView.
-
getEditReactionsViewStyle
final EditReactionsViewStyle getEditReactionsViewStyle()
Style for EditReactionsView.
-
getIconIndicatorSent
final Drawable getIconIndicatorSent()
Icon for message's sent status. Default value is R.drawable.stream_ui_ic_check_single.
-
getIconIndicatorRead
final Drawable getIconIndicatorRead()
Icon for message's read status. Default value is R.drawable.stream_ui_ic_check_double.
-
getIconIndicatorPendingSync
final Drawable getIconIndicatorPendingSync()
Icon for message's pending status. Default value is R.drawable.stream_ui_ic_clock.
-
getIconOnlyVisibleToYou
final Drawable getIconOnlyVisibleToYou()
Icon for message's pending status. Default value is R.drawable.stream_ui_ic_icon_eye_off.
-
getTextStyleMessageDeleted
final TextStyle getTextStyleMessageDeleted()
Appearance for message deleted text.
-
getMessageDeletedBackground
final Integer getMessageDeletedBackground()
Background color for deleted message. Default value is R.color.stream_ui_grey_whisper.
-
getTextStyleMessageDeletedMine
final TextStyle getTextStyleMessageDeletedMine()
Appearance for mine message deleted text. Default value is textStyleMessageDeleted.
-
getMessageDeletedBackgroundMine
final Integer getMessageDeletedBackgroundMine()
Background color for mine deleted message. Default value is messageDeletedBackground.
-
getTextStyleMessageDeletedTheirs
final TextStyle getTextStyleMessageDeletedTheirs()
Appearance for theirs message deleted text. Default value is textStyleMessageDeleted.
-
getMessageDeletedBackgroundTheirs
final Integer getMessageDeletedBackgroundTheirs()
Background color for theirs deleted message. Default value is messageDeletedBackground.
-
getMessageStrokeColorMine
final Integer getMessageStrokeColorMine()
Stroke color for message sent by the current user. Default value is MESSAGE_STROKE_COLOR_MINE.
-
getMessageStrokeWidthMine
final Float getMessageStrokeWidthMine()
Stroke width for message sent by the current user. Default value is MESSAGE_STROKE_WIDTH_MINE.
-
getMessageStrokeColorTheirs
final Integer getMessageStrokeColorTheirs()
Stroke color for message sent by other user. Default value is MESSAGE_STROKE_COLOR_THEIRS.
-
getMessageStrokeWidthTheirs
final Float getMessageStrokeWidthTheirs()
Stroke width for message sent by other user. Default value is MESSAGE_STROKE_WIDTH_THEIRS.
-
getTextStyleSystemMessage
final TextStyle getTextStyleSystemMessage()
Appearance for system message text.
-
getTextStyleErrorMessage
final TextStyle getTextStyleErrorMessage()
Appearance for error message text.
-
getPinnedMessageIndicatorTextStyle
final TextStyle getPinnedMessageIndicatorTextStyle()
-
getPinnedMessageIndicatorIcon
final Drawable getPinnedMessageIndicatorIcon()
-
getPinnedMessageBackgroundColor
final Integer getPinnedMessageBackgroundColor()
-
getMessageStartMargin
final Integer getMessageStartMargin()
Margin for messages in the left side. Default value is 48dp.
-
getMessageEndMargin
final Integer getMessageEndMargin()
Margin for messages in the right side. Default value is 0dp.
-
getMessageMaxWidthFactorMine
final Float getMessageMaxWidthFactorMine()
Factor used to compute max width for message sent by the current user. Should be in <0.75, 1> range.
-
getMessageMaxWidthFactorTheirs
final Float getMessageMaxWidthFactorTheirs()
Factor used to compute max width for message sent by other user. Should be in <0.75, 1> range.
-
getShowMessageDeliveryStatusIndicator
final Boolean getShowMessageDeliveryStatusIndicator()
Flag if we need to show the delivery indicator or not.
-
getIconFailedMessage
final Drawable getIconFailedMessage()
Icon for message failed status. Default value is R.drawable.stream_ui_ic_warning.
-
getIconBannedMessage
final Drawable getIconBannedMessage()
Icon for message when the current user is banned. Default value is R.drawable.stream_ui_ic_warning.
-
getSystemMessageAlignment
final Integer getSystemMessageAlignment()
Changes the alignment of system messages.
-
getLoadingMoreView
final Integer getLoadingMoreView()
Loading more view. Default value is R.layout.stream_ui_message_list_loading_more_view.
-
getUnreadSeparatorBackgroundColor
final Integer getUnreadSeparatorBackgroundColor()
-
getUnreadSeparatorTextStyle
final TextStyle getUnreadSeparatorTextStyle()
-
getStyleTextColor
@ColorInt() final Integer getStyleTextColor(Boolean isMine)
-
getStyleLinkTextColor
@ColorInt() final Integer getStyleLinkTextColor(Boolean isMine)
-
-
-
-