transformAndApply

abstract fun transformAndApply(textView: TextView, messageItem: MessageListItem.MessageItem)

Transforms a given MessageListItem.MessageItem and sets the formatted string to the TextView.

For example, this implementation would convert the message to upper case and then set it to the textView.

val toUpperCaseTransformer = ChatMessageTextTransformer { textView, messageItem ->
val upperCaseMessage = messageItem.message.text.uppercase(Locale.getDefault())
textView.text = upperCaseMessage
}