GiphyAttachmentContent

fun GiphyAttachmentContent(attachmentState: AttachmentState, modifier: Modifier = Modifier, giphyInfoType: GiphyInfoType = GiphyInfoType.ORIGINAL, giphySizingMode: GiphySizingMode = GiphySizingMode.ADAPTIVE, contentScale: ContentScale = ContentScale.Crop, onItemClick: (context: Context, previewUrl: String) -> Unit = ::onGiphyAttachmentContentClick)

Builds a Giphy attachment message.

It shows the GIF, as well as a label for users to recognize it's sent from Giphy.

Parameters

attachmentState
  • The attachment to show.

modifier

Modifier for styling.

giphyInfoType

Used to modify the quality and dimensions of the rendered Giphy attachments.

giphySizingMode

Sets the Giphy container sizing strategy. Setting it to automatic makes the container capable of adaptive resizing and ignore StreamDimens.attachmentsContentGiphyWidth and StreamDimens.attachmentsContentGiphyHeight dimensions, however you can still clip maximum dimensions using StreamDimens.attachmentsContentGiphyMaxWidth and StreamDimens.attachmentsContentGiphyMaxHeight. Setting it to fixed size mode will make it respect all given dimensions.

contentScale

Used to determine the way Giphys are scaled inside the Image composable.

onItemClick

Lambda called when an item gets clicked.