MediaAttachmentViewStyle

data class MediaAttachmentViewStyle(val progressIcon: Drawable, val placeholderIcon: Drawable, @ColorInt val placeholderIconTint: Int?, @ColorInt val mediaPreviewBackgroundColor: Int, @ColorInt val moreCountOverlayColor: Int, val moreCountTextStyle: TextStyle, val playVideoIcon: Drawable?, @ColorInt val playVideoIconTint: Int?, @ColorInt val playVideoIconBackgroundColor: Int, val playVideoIconElevation: Float, val playVideoIconPaddingTop: Int, val playVideoIconPaddingBottom: Int, val playVideoIconPaddingStart: Int, val playVideoIconPaddingEnd: Int, val playVideoIconCornerRadius: Float) : ViewStyle

Style for MediaAttachmentView. Use this class together with TransformStyle.mediaAttachmentStyleTransformer to change styles programmatically.

Parameters

progressIcon

Animated progress drawable. Default value is R.drawable.stream_ui_rotating_indeterminate_progress_gradient.

placeholderIcon

Displayed while the media preview is Loading.

placeholderIconTint

The tint applied to the placeholder icon displayed before a media attachment preview was loaded or after loading had failed. Default value is R.drawable.stream_ui_picture_placeholder.

mediaPreviewBackgroundColor

Controls the background color of image and video attachment previews. Default value is R.color.stream_ui_grey.

moreCountOverlayColor

More count semi-transparent overlay color. Default value is R.color.stream_ui_overlay.

moreCountTextStyle

Appearance for "more count" text.

playVideoIcon

The icon overlaid above previews of video attachments.

playVideoIconTint

The tint of the play video icon. Default value is R.drawable.stream_ui_ic_play

playVideoIconBackgroundColor

Applies a background colour to the View hosting the play video icon. Default value is R.color.stream_ui_literal_white

playVideoIconElevation

Determines the elevation of the play video button.

playVideoIconPaddingTop

Determines the padding set between the top of the play video icon and its parent.

playVideoIconPaddingBottom

Determines the padding set between the bottom of the play video icon and its parent.

playVideoIconPaddingStart

Determines the padding set between the start of the play video icon and its parent.

playVideoIconPaddingEnd

Determines the padding set between the end of the play video icon and its parent.

playVideoIconCornerRadius

Determines the corner radius of the play video icon.

Constructors

Link copied to clipboard
constructor(progressIcon: Drawable, placeholderIcon: Drawable, @ColorInt placeholderIconTint: Int?, @ColorInt mediaPreviewBackgroundColor: Int, @ColorInt moreCountOverlayColor: Int, moreCountTextStyle: TextStyle, playVideoIcon: Drawable?, @ColorInt playVideoIconTint: Int?, @ColorInt playVideoIconBackgroundColor: Int, playVideoIconElevation: Float, playVideoIconPaddingTop: Int, playVideoIconPaddingBottom: Int, playVideoIconPaddingStart: Int, playVideoIconPaddingEnd: Int, playVideoIconCornerRadius: Float)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard