newInstance

fun newInstance(context: Context, message: Message, messageOptionItems: List<MessageOptionItem>, optionsDialogType: MessageOptionsDialogFragment.OptionsDialogType = OptionsDialogType.MESSAGE_OPTIONS, style: MessageListViewStyle = MessageListViewStyle.createDefault(context), messageBackgroundFactory: MessageBackgroundFactory = MessageBackgroundFactoryImpl(style.itemStyle), attachmentFactoryManager: AttachmentFactoryManager = ChatUI.attachmentFactoryManager, messageListItemViewHolderFactory: MessageListItemViewHolderFactory = MessageListItemViewHolderFactory() .apply { setAttachmentFactoryManager(attachmentFactoryManager) setMessageListItemStyle(style.itemStyle) setGiphyViewHolderStyle(style.giphyViewHolderStyle) setAudioRecordViewStyle(style.audioRecordPlayerViewStyle) setReplyMessageListItemViewStyle(style.replyMessageStyle) decoratorProvider = object : DecoratorProvider { override val decorators: List<Decorator> get() = emptyList() } }, showAvatarPredicate: MessageListView.ShowAvatarPredicate = DefaultShowAvatarPredicate()): MessageOptionsDialogFragment

Creates a new instance of MessageOptionsDialogFragment.

Parameters

context

The context to load resources.

message

The selected message.

messageOptionItems

The list of message options to display.

optionsDialogType

The type of options dialog.

style

The style for the dialog.

messageBackgroundFactory

The factory for message background.

attachmentFactoryManager

The factory for the attachments in the selected message.

messageListItemViewHolderFactory

The factory class for message items.

showAvatarPredicate

If an avatar should be shown for the message.