Builder

open class Builder

This is a Builder that is able to create the OpenChannel fragment. The builder provides options how the channel is showing and working. Also you can set the event handler what you want to override. since 2.0.0

Constructors

Link copied to clipboard
open fun Builder(@NonNull channelUrl: String)
Constructor
Link copied to clipboard
open fun Builder(@NonNull channelUrl: String, @NonNull themeMode: SendbirdUIKit.ThemeMode)
Constructor
Link copied to clipboard
open fun Builder(@NonNull channelUrl: String, @StyleRes customThemeResId: Int)
Constructor

Functions

Link copied to clipboard
open fun build(): OpenChannelFragment
Creates an OpenChannelFragment with the arguments supplied to this builder.
Link copied to clipboard
open fun <T : OpenChannelFragment?> setCustomFragment(fragment: T): OpenChannelFragment.Builder
Sets the custom fragment.
Link copied to clipboard
open fun setEditedTextMarkUIConfig(@Nullable configSentFromMe: TextUIConfig, @Nullable configSentFromOthers: TextUIConfig): OpenChannelFragment.Builder
Sets the UI configuration of edited text mark.
Link copied to clipboard
open fun setEmptyIcon(@DrawableRes resId: Int): OpenChannelFragment.Builder
open fun setEmptyIcon(@DrawableRes resId: Int, @Nullable tint: ColorStateList): OpenChannelFragment.Builder
Sets the icon when the data is not exists.
Link copied to clipboard
open fun setEmptyText(@StringRes resId: Int): OpenChannelFragment.Builder
Sets the text when the data is not exists
Link copied to clipboard
open fun setErrorText(@StringRes resId: Int): OpenChannelFragment.Builder
Sets the text when error occurs
Link copied to clipboard
open fun setHeaderDescription(@NonNull description: String): OpenChannelFragment.Builder
Sets the description of the header.
Link copied to clipboard
open fun setHeaderLeftButtonIcon(@DrawableRes resId: Int, @Nullable tint: ColorStateList): OpenChannelFragment.Builder
Sets the icon on the left button of the header.
Link copied to clipboard
open fun setHeaderLeftButtonIconResId(@DrawableRes resId: Int): OpenChannelFragment.Builder
Sets the icon on the left button of the header.
Link copied to clipboard
Sets the icon on the right button of the header.
Link copied to clipboard
Sets the icon on the right button of the header.
Link copied to clipboard
open fun setHeaderTitle(@NonNull title: String): OpenChannelFragment.Builder
Sets the title of the header.
Link copied to clipboard
open fun setInputHint(@NonNull hint: String): OpenChannelFragment.Builder
Sets the hint of the input text.
Link copied to clipboard
open fun setInputLeftButtonIcon(@DrawableRes resId: Int, @Nullable tint: ColorStateList): OpenChannelFragment.Builder
Sets the icon on the left button of the input.
Link copied to clipboard
open fun setInputLeftButtonIconResId(@DrawableRes resId: Int): OpenChannelFragment.Builder
Sets the icon on the left button of the input.
Link copied to clipboard
open fun setInputRightButtonIcon(@DrawableRes resId: Int, @Nullable tint: ColorStateList): OpenChannelFragment.Builder
Sets the icon on the right button of the input.
Link copied to clipboard
open fun setInputRightButtonIconResId(@DrawableRes resId: Int): OpenChannelFragment.Builder
Sets the icon on the right button of the input.
Link copied to clipboard
open fun setInputText(@NonNull inputText: String): OpenChannelFragment.Builder
Sets the input text
Link copied to clipboard
The message input displays as a dialog type.
Link copied to clipboard
open fun setLinkedTextColor(@ColorRes colorRes: Int): OpenChannelFragment.Builder
Sets the UI configuration of the linked text color in the message text.
Link copied to clipboard
open fun setLoadingDialogHandler(@NonNull loadingDialogHandler: LoadingDialogHandler): OpenChannelFragment.Builder
Sets the custom loading dialog handler
Link copied to clipboard
open fun setMessageBackground(@DrawableRes drawableResSentFromMe: Int, @DrawableRes drawableResSentFromOthers: Int): OpenChannelFragment.Builder
Sets the UI configuration of message background drawable.
Link copied to clipboard
open fun setMessageInputTextUIConfig(@NonNull textUIConfig: TextUIConfig): OpenChannelFragment.Builder
Sets the UI configuration of message input text.
Link copied to clipboard
open fun setMessageListParams(@NonNull params: MessageListParams): OpenChannelFragment.Builder
Sets the message list params for this channel.
Link copied to clipboard
open fun setMessageTextUIConfig(@Nullable configSentFromMe: TextUIConfig, @Nullable configSentFromOthers: TextUIConfig): OpenChannelFragment.Builder
Sets the UI configuration of message text.
Link copied to clipboard
open fun setNicknameTextUIConfig(    @Nullable configSentFromMe: TextUIConfig,     @Nullable configSentFromOthers: TextUIConfig,     @Nullable configSentFromOperator: TextUIConfig): OpenChannelFragment.Builder
Sets the UI configuration of sender nickname text.
Link copied to clipboard
open fun setOgtagBackground(@DrawableRes drawableResSentFromMe: Int, @DrawableRes drawableResSentFromOthers: Int): OpenChannelFragment.Builder
Sets the UI configuration of ogtag message background drawable.
Link copied to clipboard
open fun setOnEditModeCancelButtonClickListener(@Nullable editModeCancelButtonClickListener: View.OnClickListener): OpenChannelFragment.Builder
Register a callback to be invoked when the cancel button is clicked, when the input is the edited mode.
Link copied to clipboard
open fun setOnEditModeSaveButtonClickListener(@Nullable editModeSaveButtonClickListener: View.OnClickListener): OpenChannelFragment.Builder
Register a callback to be invoked when the save button is clicked, when the input is the edited mode.
Link copied to clipboard
open fun setOnEditModeTextChangedListener(@NonNull editModeTextChangedListener: OnInputTextChangedListener): OpenChannelFragment.Builder
Sets the listener invoked when a text of message input is edited.
Link copied to clipboard
open fun setOnHeaderLeftButtonClickListener(@NonNull headerLeftButtonClickListener: View.OnClickListener): OpenChannelFragment.Builder
Sets the click listener on the left button of the header.
Link copied to clipboard
open fun setOnHeaderRightButtonClickListener(@NonNull headerRightButtonClickListener: View.OnClickListener): OpenChannelFragment.Builder
Sets the click listener on the right button of the header.
Link copied to clipboard
open fun setOnInputLeftButtonClickListener(@NonNull inputLeftButtonClickListener: View.OnClickListener): OpenChannelFragment.Builder
Sets the click listener on the left button of the input.
Link copied to clipboard
open fun setOnInputModeChangedListener(@Nullable inputModeChangedListener: OnInputModeChangedListener): OpenChannelFragment.Builder
Register a callback to be invoked when the input mode is changed.
Link copied to clipboard
open fun setOnInputRightButtonClickListener(@Nullable inputRightButtonClickListener: View.OnClickListener): OpenChannelFragment.Builder
Register a callback to be invoked when the right button of the input is clicked.
Link copied to clipboard
open fun setOnInputTextChangedListener(@NonNull inputTextChangedListener: OnInputTextChangedListener): OpenChannelFragment.Builder
Sets the listener invoked when a text of message input is changed..
Link copied to clipboard
open fun setOnMessageClickListener(@NonNull messageClickListener: OnItemClickListener<BaseMessage>): OpenChannelFragment.Builder
Sets the click listener on the item of message list.
Link copied to clipboard
open fun setOnMessageInsertedListener(@Nullable messageInsertedListener: OnItemEventListener<BaseMessage>): OpenChannelFragment.Builder
Register a callback to be invoked when the message is inserted.
Link copied to clipboard
open fun setOnMessageLongClickListener(@NonNull messageLongClickListener: OnItemLongClickListener<BaseMessage>): OpenChannelFragment.Builder
Sets the long click listener on the item of message list.
Link copied to clipboard
open fun setOnMessageProfileLongClickListener(@Nullable messageProfileLongClickListener: OnItemLongClickListener<BaseMessage>): OpenChannelFragment.Builder
Register a callback to be invoked when the profile view of the message is long-clicked.
Link copied to clipboard
open fun setOnProfileClickListener(@NonNull messageProfileClickListener: OnItemClickListener<BaseMessage>): OpenChannelFragment.Builder
Sets the click listener on the profile of message.
Link copied to clipboard
open fun setOnScrollBottomButtonClickListener(@Nullable scrollBottomButtonClickListener: View.OnClickListener): OpenChannelFragment.Builder
Register a callback to be invoked when the button to scroll to the bottom is clicked.
Link copied to clipboard
open fun setOnScrollFirstButtonClickListener(@Nullable scrollFirstButtonClickListener: OnConsumableClickListener): OpenChannelFragment.Builder
Register a callback to be invoked when the button to scroll to the first position is clicked.
Link copied to clipboard
open fun setOpenChannelConfig(@NonNull openChannelConfig: OpenChannelConfig): OpenChannelFragment.Builder
Sets open channel configuration for this fragment.
Link copied to clipboard
Sets the message list adapter.
Link copied to clipboard
open fun setSentAtTextUIConfig(@Nullable configSentFromMe: TextUIConfig, @Nullable configSentFromOthers: TextUIConfig): OpenChannelFragment.Builder
Sets the UI configuration of message sentAt text.
Link copied to clipboard
open fun setUseHeader(useHeader: Boolean): OpenChannelFragment.Builder
Sets whether the header is used.
Link copied to clipboard
open fun setUseHeaderLeftButton(useHeaderLeftButton: Boolean): OpenChannelFragment.Builder
Sets whether the left button of the header is used.
Link copied to clipboard
open fun setUseHeaderProfileImage(useHeaderProfileImage: Boolean): OpenChannelFragment.Builder
Sets whether the profile image of the header is used.
Link copied to clipboard
open fun setUseHeaderRightButton(useHeaderRightButton: Boolean): OpenChannelFragment.Builder
Sets whether the right button of the header is used.
Link copied to clipboard
open fun setUseInputLeftButton(useInputLeftButton: Boolean): OpenChannelFragment.Builder
Sets whether the left button of the input is used.
Link copied to clipboard
open fun setUseMessageGroupUI(useMessageGroupUI: Boolean): OpenChannelFragment.Builder
Sets whether the message group UI is used.
Link copied to clipboard
open fun setUseUserProfile(useUserProfile: Boolean): OpenChannelFragment.Builder
Sets whether the user profile uses.
Link copied to clipboard
open fun showInputRightButtonAlways(): OpenChannelFragment.Builder
Sets whether showing the right button of the input always.
Link copied to clipboard
open fun useOverlayMode(): OpenChannelFragment.Builder
The channel displays as a overlay mode.
Link copied to clipboard
open fun withArguments(@NonNull args: Bundle): OpenChannelFragment.Builder
Sets arguments to this fragment.