Chat UIKit Android View v3
Chat UIKit Android View
Chat UIKit
Android View
Version 3

Migration guide

Copy link

UIKit v3 for Android is now available. UIKit v3 has a dependency on Chat SDK v4. Before migrating from v2 to v3, refer to the migration guide of Chat SDK v4 for Android for any breaking changes. The Chat SDK must be updated first before proceeding with the latest version of UIKit.

The biggest change from v2 to v3 is modularization, which allows you to build and customize views at a component level. You can execute key functions, such as list channels, using a fragment, module, and view model. Each fragment has a module that creates the view, and each module is made up of components. A fragment also has a corresponding ViewModel that provides the necessary data and APIs from Sendbird Chat SDK. This new architecture allows for easier and more detailed customization.

When migrating from v2 to v3, there are several breaking changes you need to remember. Since modules and view models are one of the main parts of the new architecture, you need to make changes to the existing codes in your client app. Refer to the breaking changes below.


Key functions

Copy link

Key functions are carried out on a screen basis, meaning each function corresponds to a single screen. In v3, a key function is composed of three main components: fragment, module, and ViewModel. Refer to the table below to see which key functions we provide and the components that make up each key function.

Key functionFragmentModuleComponentViewModel

List channels

ChannelListFragment

ChannelListModule

HeaderComponent

ChannelListComponent

StatusComponent

ChannelListViewModel

Chat in a group channel

ChannelFragment

ChannelModule

ChannelHeaderComponent

MessageListComponent

MessageInputComponent

StatusComponent

ChannelViewModel

Chat in an open channel

OpenChannelFragment

OpenChannelModule

OpenChannelHeaderComponent

OpenChannelMessageListComponent

OpenChannelMessageInputComponent

StatusComponent

OpenChannelViewModel

Create a group channel

CreateChannelFragment

CreateChannelModule

SelectUserHeaderComponent

CreateChannelUserListComponent

StatusComponent

CreateChannelViewModel

Configure group channel settings

ChannelSettingsFragment

ChannelSettingsModule

ChannelSettingsHeaderComponent

ChannelSettingsInfoComponent

ChannelSettingsMenuComponent

ChannelSettingsViewModel

Configure open channel settings

OpenChannelSettingsFragment

OpenChannelSettingsModule

OpenChannelSettingsHeaderComponent

OpenChannelSettingsInfoComponent

OpenChannelSettingsMenuComponent

OpenChannelSettingsViewModel

Invite users

InviteUserFragment

InviteUserModule

SelectUserHeaderComponent

InviteUserListComponent

StatusComponent

InviteUserViewModel

Register members as operators

RegisterOperatorFragment

RegisterOperatorModule

SelectUserHeaderComponent

RegisterOperatorListComponent

StatusComponent

RegisterOperatorViewModel

Register participants as operators

OpenChannelRegisterOperatorFragment

OpenChannelRegisterOperatorModule

SelectUserHeaderComponent

RegisterOperatorListComponent

StatusComponent

OpenChannelRegisterOperatorViewModel

List channel members

MemberListFragment

MemberListModule

HeaderComponent

MemberListComponent

StatusComponent

MemberListViewModel

List channel participants

ParticipantListFragment

ParticipantListModule

HeaderComponent

ParticipantListComponent

StatusComponent

ParticipantViewModel

List banned users in group channel

BannedUserListFragment

BannedUserListModule

HeaderComponent

BannedUserListComponent

StatusComponent

BannedUserListViewModel

List banned users in open channel

OpenChannelBannedUserListFragment

OpenChannelBannedUserListModule

HeaderComponent

OpenChannelBannedUserListComponent

StatusComponent

OpenChannelBannedUserListViewModel

List muted members

MutedMemberListFragment

MutedMemberListModule

HeaderComponent

MutedMemberListComponent

StatusComponent

MutedMemberListViewModel

List muted participants

OpenChannelMutedParticipantListFragment

OpenChannelMutedParticipantListModule

HeaderComponent

OpenChannelMutedParticipantListComponent

StatusComponent

OpenChannelMutedParticipantListViewModel

List operators in group channel

OperatorListFragment

OperatorListModule

HeaderComponent

OperatorListComponent

StatusComponent

OperatorListViewModel

List operators in open channel

OpenChannelOperatorListFragment

OpenChannelOperatorListModule

HeaderComponent

OpenChannelOperatorListComponent

StatusComponent

OpenChannelOperatorListViewModel

Moderate group channels and members

ModerationFragment

ModerationModule

HeaderComponent

ModerationListComponent

ModerationViewModel

Moderate open channels and participants

OpenChannelModerationFragment

OpenChannelModerationModule

HeaderComponent

OpenChannelModerationListComponent

OpenChannelModerationViewModel

Search messages

MessageSearchFragment

MessageSearchModule

MessageSearchHeaderComponent

MessageSearchListComponent

StatusComponent

MessageSearchViewModel


Configuration changes

Copy link

To migrate to the new version, open the build.gradle file at the application level. For both Java and Kotlin, add the code blocks and dependencies as follows:

android {
    defaultConfig {
        minSdkVersion 21
    }
    buildFeatures {
        viewBinding true
    }
}

API changes in all fragments

Copy link

In v3, there are new changes to APIs that create and customize fragments. Refer to the breaking changes that apply to all fragments in the UIKit below.

Default setter method value

Copy link

In v2, the default value of the setter method in a fragment was set to false. But in v3, the value has changed to true. For example, the default value of the setUseHeader() method in the HeaderComponent of ChannelListFragment was previously false but it's now changed to true. In fragments that previously didn't use a header region in v2, you must now manually change the value to false if you don't wish to use it in v3. When using custom fragments, call the onConfigureParams method to access the setter methods that were previously provided by the builder. Refer to the codes below.

From v2

Copy link
KotlinJava
val fragment: Fragment = ChannelListFragment.Builder().build()
KotlinJava
// Use non-customized fragments through the builder.
val fragment: Fragment = ChannelListFragment.Builder()
    .setUseHeader(false)
    .build()

// Use custom fragments.
class CustomChannelListFragment : ChannelListFragment() {
    override fun onConfigureParams(module: ChannelListModule, args: Bundle) {
        val params = module.params
        params.setUseHeader(false)
    }
}

Customize theme

Copy link

Starting in v3, you can't apply a custom theme to customized fragments using a fragment.builder() class. In order to do so, you must call the Params class of the fragment and set the style resource as a parameter. For non-custom fragments, you can apply a custom theme using the builder class. See the codes below.

From v2

Copy link
KotlinJava
val fragment: Fragment = ChannelListFragment.Builder((R.style.custom_theme_resource_id).build()
KotlinJava
// Apply custom theme to non-customized fragments through the builder.
val fragment: Fragment = ChannelListFragment.Builder(R.style.custom_theme_resource_id).build()

// Apply custom theme to customized fragments.
class CustomChannelListFragment : ChannelListFragment() {
    override fun onCreateModule(args: Bundle): ChannelListModule {
        val params = ChannelListModule.Params(requireContext(), R.string.custom_theme_resource_id)
        return ChannelListModule(requireContext(), params)
    }
}

Note: Go to the Customize style resource page to learn more.


Custom fragment changes

Copy link

Unlike v2, the new version doesn't allow you to use custom fragments through fragment.builder() to create a view. You can only use default fragments through the builder class. See the guide below on how to build your own custom fragment.

Create a custom fragment

Copy link
  1. Inherit the fragment you wish to make changes to and create a custom fragment.
  2. In each fragment.builder() class, there are UI-related APIs such as view properties, methods, and event handlers. To customize each fragment, you must override those setter methods. Refer to the following codes on how to build a custom ChannelListFragment as an example.

From v2

Copy link
KotlinJava
val fragment: Fragment = ChannelListFragment.Builder()
    .setCustomChannelListFragment(new CustomChannelListFragment())
    .setUseHeader(true)
    .setHeaderTitle("Channels")
    .setUseHeaderLeftButton(true)
    .setUseHeaderRightButton(true)
    .setHeaderLeftButtonIconResId(R.drawable.icon_arrow_left)
    .setHeaderRightButtonIconResId(R.drawable.icon_create)
    .setHeaderLeftButtonListener(leftButtonListener)
    .setHeaderRightButtonListener(rightButtonListener)
    .setChannelListAdapter(adapter)
    .setItemClickListener(itemClickListener)
    .setItemLongClickListener(itemLongClickListener)
    .setGroupChannelListQuery(query)
    .setEmptyIcon(R.drawable.icon_chat)
    .setEmptyText(R.string.text_empty)
    .build()
KotlinJava
class CustomChannelListFragment : ChannelListFragment() {
    override fun onConfigureParams(module: ChannelListModule, args: Bundle) {
        module.headerComponent.params.apply {
            this.title = "title"
            this.setUseRightButton(false)
            this.setUseLeftButton(false)
            this.leftButtonIcon = drawable
            this.rightButtonIcon = drawable
        }

        module.statusComponent.params.apply {
            this.emptyIcon = drawable
            this.emptyIconTint = colorStateList
            this.emptyText = "empty text"
            this.errorText = "error text"
        }
    }

    override fun onBeforeReady(status: ReadyStatus, module: ChannelListModule, viewModel: ChannelListViewModel) {
        super.onBeforeReady(status, module, viewModel)
        module.channelListComponent.setAdapter(adapter)
    }

    override fun onBindHeaderComponent(headerComponent: HeaderComponent, viewModel: ChannelListViewModel) {
        super.onBindHeaderComponent(headerComponent, viewModel)
        headerComponent.setOnLeftButtonClickListener(leftButtonListener)
        headerComponent.setOnRightButtonClickListener(rightButtonListener)
    }

    override fun onBindChannelListComponent(
        channelListComponent: ChannelListComponent,
        viewModel: ChannelListViewModel
    ) {
        super.onBindChannelListComponent(channelListComponent, viewModel)
        channelListComponent.setOnItemClickListener(itemClickListener)
        channelListComponent.setOnItemLongClickListener(itemLongClickListener)
    }
}

// You can apply a custom fragment by builder from v3.2.1.
// UIKit v3 builders still support various setter methods.
val fragment: Fragment = ChannelListFragment.Builder()
    .setCustomFragment(CustomChannelListFragment())
    .build()

List of methods to override

Copy link

The following table shows a list of methods you must override to build a custom fragment.

To v3
MethodDescription

onConfigureParams(ChannelListModule, Bundle)

Specifies the method to change the value of view properties using the parameters of the corresponding component.

onBeforeReady(ReadyStatus, ChannelListModule, ChannelListViewModel)

Specifies the method to set custom adapters in the component once a view has been created.

onBindHeaderComponent(HeaderComponent, ChannelListViewModel)

Specifies the method to bind event handlers to HeaderComponent of the channel list screen.

onBindChannelListComponent(ChannelListComponent, ChannelListViewModel)

Specifies the method to bind event handlers to ChannelListComponent of the channel list screen.

onBindStatusComponent(StatusComponent, ChannelListViewModel)

Specifies the method to bind event handlers to StatusComponent of the channel list screen.

Set a custom fragment factory

Copy link

After creating a custom fragment, follow the guide below on how to set a custom fragment factory. In UIKit v3, all activities use the UIKitFragmentFactory class to create a fragment. UIKitFragmentFactory is a global class that provides and manages all fragments used in Sendbird UIKit. While an activity creates the basic UI screen and allows the user to navigate between different screens, the fragment within the activity is what allows you to customize components and manage data.

If you wish to customize a fragment, you need to inherit the UIKitFragmentFactory class and override the method that creates the fragment. Then, you must return the customized fragment in order to apply the customization throughout the UIKit.

Note: If you're only using fragments to build a screen in UIKit instead of using an activity, you can skip the following steps.

  1. Inherit the UIKitFragmentFactory class to create a custom UIKitFragmentFactory.
  2. Override the method that creates the fragment you wish to customize and return the custom fragment. When returning the fragment, the Bundle class containing necessary data to build a view is also returned as parameters.
KotlinJava
class CustomFragmentFactory : UIKitFragmentFactory() {
    override fun newChannelFragment(channelUrl: String, args: Bundle): Fragment {
        return ChannelFragment.Builder(channelUrl)
            .setCustomFragment(CustomChannelFragment())
            .withArguments(args)
            .build()
    }
}
  1. Set the custom fragment factory to Application using SendbirdUIKit.setUIKitFragmentFactory(UIKitFragmentFactory).
KotlinJava
class MyApplication : Application() {
    override fun onCreate() {
        SendbirdUIKit.setUIKitFragmentFactory(CustomFragmentFactory())
    }
}

List of methods to inherit

Copy link

The following table shows a list of methods you must inherit to create a new fragment in each key function.

Key functionFragmentMethod

List channels

ChannelListFragment

Fragment newChannelListFragment(Bundle)

Chat in a group channel

ChannelFragment

Fragment newChannelFragment(String, Bundle)

Chat in an open channel

OpenChannelFragment

Fragment newOpenChannelFragment(String, Bundle)

Create a group channel

CreateChannelFragment

Fragment newCreateChannelFragment(CreatableChannelType, Bundle)

Configure group channel settings

ChannelSettingsFragment

Fragment newChannelSettingsFragment(String, Bundle)

Configure open channel settings

OpenChannelSettingsFragment

Fragment newOpenChannelSettingsFragment(String, Bundle)

Invite users

InviteUserFragment

Fragment newInviteUserFragment(String, Bundle)

Register as operator

RegisterOperatorFragment

Fragment newRegisterOperatorFragment(String, Bundle)

List channel members

MemberListFragment

Fragment newMemberListFragment(String, Bundle)

List channel participants

ParticipantListFragment

Fragment newParticipantListFragment(String, Bundle)

List banned users

BannedUserListFragment

Fragment newBannedUserListFragment(String, Bundle)

List muted members

MutedMemberListFragment

Fragment newMutedMemberListFragment(String, Bundle)

List operators

OperatorListFragment

Fragment newOperatorListFragment(String, Bundle)

Moderate channels and members

ModerationFragment

Fragment newModerationFragment(String, Bundle)

Search messages

MessageSearchFragment

Fragment newMessageSearchFragment(String, Bundle)


API changes in each fragment

Copy link

When migrating from v2 to v3, you should be aware of some changes to the setter methods in the builder class of each fragment. Refer to the codes below to see how to migrate the changed APIs for each fragment builder.

ChannelListFragment.Builder

Copy link

The following methods have changed names in v3.

From v2

Copy link
KotlinJava
val fragment: Fragment = ChannelListFragment.Builder()
    .setHeaderLeftButtonListener(leftButtonListener)
    .setHeaderRightButtonListener(rightButtonListener)
    .setItemClickListener(itemClickListener)
    .setItemLongClickListener(itemLongClickListener)
    .build()
KotlinJava
val fragment: Fragment = ChannelListFragment.Builder()
    .setOnHeaderLeftButtonClickListener(leftButtonListener)
    .setOnHeaderRightButtonClickListener(rightButtonListener)
    .setOnItemClickListener(itemClickListener)
    .setOnItemLongClickListener(itemLongClickListener)
    .build()

ChannelFragment.Builder

Copy link

The following methods have changed names in v3.

From v2

Copy link
KotlinJava
val fragment: Fragment = ChannelFragment.Builder(channelUrl)
    .setHeaderLeftButtonListener(leftButtonListener)
    .setHeaderRightButtonListener(rightButtonListener)
    .setInputLeftButtonListener(inputClickListener)
    .setOnProfileClickListener(profileClickListener)
    .build()
KotlinJava
val fragment: Fragment = ChannelFragment.Builder(channelUrl)
    .setOnHeaderLeftButtonClickListener(leftButtonListener)
    .setOnHeaderRightButtonClickListener(rightButtonListener)
    .setOnInputLeftButtonClickListener(inputClickListener)
    .setOnMessageProfileClickListener(profileClickListener)
    .build()

In the ChannelFragment.Builder class, the setListItemClickListener method and setListItemLongClickListener method have separated into individual event listener methods for each view item.

From v2

Copy link
KotlinJava
val fragment: Fragment = ChannelFragment.Builder(channelUrl)
    .setListItemClickListener(identifiableItemClickListener)
    .setListItemLongClickListener(identifiableItemLongClickListener)
    .build()

// Or use the code below.

class CustomChannelFragment : ChannelFragment() {
    override fun onIdentifiableItemClick(view: View, identifier: String, message: BaseMessage) {
        when (identifier) {
            is StringSet.Chat -> {}
            is StringSet.Profile -> {}
            is StringSet.QuoteReply -> {}
        }
    }
}
KotlinJava
val fragment: Fragment = ChannelFragment.Builder(channelUrl)
    .setOnMessageClickListener(messageClickListener)
    .setOnQuoteReplyMessageClickListener(quoteReplyMessageClickListener)
    .setOnMessageProfileClickListener(messageProfileClickListener)
    .setOnMessageLongClickListener(messageLongClickListener)
    .setOnQuoteReplyMessageLongClickListener(quoteReplyMessageLongClickListener)
    .setOnMessageProfileLongClickListener(messageProfileLongClickListener)
    .build()

// Or use the code below.

class CustomChannelFragment : ChannelFragment() {
    override fun onMessageClicked(view: View, position: Int, message: BaseMessage) {}
    override fun onMessageProfileClicked(view: View, position: Int, message: BaseMessage) {}
    override fun onQuoteReplyMessageClicked(view: View, position: Int, message: BaseMessage) {}
}

OpenChannelFragment.Builder

Copy link

The following methods have changed names in v3.

From v2

Copy link
KotlinJava
val fragment: Fragment = OpenChannelFragment.Builder(channelUrl)
    .setHeaderLeftButtonListener(leftButtonListener)
    .setHeaderRightButtonListener(rightButtonListener)
    .setInputLeftButtonListener(inputClickListener)
    .setOnProfileClickListener(profileClickListener)
    .build()
KotlinJava
val fragment: Fragment = OpenChannelFragment.Builder(channelUrl)
    .setOnHeaderLeftButtonClickListener(leftButtonListener)
    .setOnHeaderRightButtonClickListener(rightButtonListener)
    .setOnInputLeftButtonClickListener(inputClickListener)
    .setOnProfileClickListener(profileClickListener)
    .build()

In the OpenChannelFragment.Builder class, the setListItemClickListener method and setListItemLongClickListener method have now been divided into individual event listener methods for each view item.

From v2

Copy link
KotlinJava
val fragment: Fragment = OpenChannelFragment.Builder(channelUrl)
    .setListItemClickListener(identifiableItemClickListener)
    .setListItemLongClickListener(identifiableItemLongClickListener)
    .build()

// Or use the code below.

class CustomChannelFragment : OpenChannelFragment() {
    override fun onIdentifiableItemClick(view: View, identifier: String, message: BaseMessage) {
        when (identifier) {
            is StringSet.Chat -> {}
            is StringSet.Profile -> {}
        }
    }
}
KotlinJava
val fragment: Fragment = OpenChannelFragment.Builder(channelUrl)
    .setOnMessageClickListener(messageClickListener)
    .setOnProfileClickListener(messageProfileClickListener)
    .setOnMessageLongClickListener(messageLongClickListener)
    .setOnMessageProfileLongClickListener(messageProfileLongClickListener)
    .build()

// Or use the code below.

class CustomOpenChannelFragment : OpenChannelFragment() {
    override fun onMessageClicked(view: View, position: Int, message: BaseMessage) {}
    override fun onMessageProfileClicked(view: View, position: Int, message: BaseMessage) {}
}

CreateChannelFragment.Builder

Copy link

The CreateableChannelType property has been changed to CreatableChannelType and the following methods have also changed names in v3.

From v2

Copy link
KotlinJava
val fragment: Fragment = CreateChannelFragment.Builder(CreateableChannelType.Normal)
    .setHeaderLeftButtonListener(leftButtonListener)
    .setCustomUserListQueryHandler(customQueryHandler)
    .build()
KotlinJava
val fragment: Fragment = CreateChannelFragment.Builder(CreatableChannelType.Normal)
    .setOnHeaderLeftButtonClickListener(leftButtonListener)
    .setCustomPagedQueryHandler(customQueryHandler)
    .build()

ChannelSettingsFragment.Builder

Copy link

The following methods have changed names in v3.

From v2

Copy link
KotlinJava
val fragment: Fragment = ChannelSettingsFragment.Builder(channelUrl)
    .setHeaderLeftButtonListener(leftButtonListener)
    .setMemberSettingClickListener(memberSettingClickListener)
    .setOnSettingMenuClickListener(menuClickListener)
    .build()
KotlinJava
val fragment: Fragment = ChannelSettingsFragment.Builder(channelUrl)
    .setOnHeaderLeftButtonClickListener(leftButtonListener)
    .setOnMenuClickListener(menuItemClickListener)
    .build()

OpenChannelSettingsFragment.Builder

Copy link

The following methods have changed names in v3.

From v2

Copy link
KotlinJava
val fragment: Fragment = OpenChannelSettingsFragment.Builder(channelUrl)
    .setHeaderLeftButtonListener(leftButtonListener)
    .setMemberSettingClickListener(memberSettingClickListener)
    .setOnSettingMenuClickListener(menuClickListener)
    .build()
KotlinJava
val fragment: Fragment = OpenChannelSettingsFragment.Builder(channelUrl)
    .setOnHeaderLeftButtonClickListener(leftButtonListener)
    .setOnMenuClickListener(menuItemClickListener)
    .build()

InviteUserFragment.Builder

Copy link

The following methods have changed names in v3.

From v2

Copy link
KotlinJava
val fragment: Fragment = InviteUserFragment.Builder(channelUrl)
    .setHeaderLeftButtonListener(leftButtonListener)
    .setUserListAdapter(userListAdapter)
    .setCustomUserListQueryHandler(userListQueryHandler)
    .build()
KotlinJava
val fragment: Fragment = InviteUserFragment.Builder(channelUrl)
    .setOnHeaderLeftButtonClickListener(leftButtonListener)
    .setInviteUserListAdapter(inviteUserListAdapter)
    .setCustomPagedQueryHandler(customPagedQueryHandler)
    .build()

RegisterOperatorFragment.Builder

Copy link

The following methods have changed names in v3.

From v2

Copy link
KotlinJava
val fragment: Fragment = RegisterOperatorFragment.Builder(channelUrl)
    .setHeaderLeftButtonListener(leftButtonListener)
    .setUserListAdapter(userListAdapter)
    .setCustomUserListQueryHandler(userListQueryHandler)
    .build()
KotlinJava
val fragment: Fragment = RegisterOperatorFragment.Builder(channelUrl)
    .setOnHeaderLeftButtonClickListener(leftButtonListener)
    .setRegisterOperatorListAdapter(registerOperatorListAdapter)
    .setCustomPagedQueryHandler(customPagedQueryHandler)
    .build()

MemberListFragment.Builder

Copy link

The following methods have changed names in v3.

From v2

Copy link
KotlinJava
val fragment: Fragment = MemberListFragment.Builder(channelUrl)
    .setHeaderLeftButtonListener(leftButtonListener)
    .setHeaderRightButtonListener(rightButtonListener)
    .setItemClickListener(itemClickListener)
    .setItemLongClickListener(itemLongClickListener)
    .setActionItemClickListener(actionItemClickListener)
    .build()
KotlinJava
val fragment: Fragment = MemberListFragment.Builder(channelUrl)
    .setOnHeaderLeftButtonClickListener(leftButtonListener)
    .setOnHeaderRightButtonClickListener(rightButtonListener)
    .setOnItemClickListener(itemClickListener)
    .setOnItemLongClickListener(itemLongClickListener)
    .setOnActionItemClickListener(actionItemClickListener)
    .build()

ParticipantListFragment.Builder

Copy link

The following methods have changed names in v3.

From v2

Copy link
KotlinJava
val fragment: Fragment = ParticipantListFragment.Builder(channelUrl)
    .setHeaderLeftButtonListener(leftButtonListener)
    .setHeaderRightButtonListener(rightButtonListener)
    .setItemClickListener(itemClickListener)
    .setItemLongClickListener(itemLongClickListener)
    .setActionItemClickListener(actionItemClickListener)
    .setUserListAdapter(userListAdapter)
    .build()
KotlinJava
val fragment: Fragment = ParticipantListFragment.Builder(channelUrl)
    .setOnHeaderLeftButtonClickListener(leftButtonListener)
    .setOnHeaderRightButtonClickListener(rightButtonListener)
    .setOnItemClickListener(itemClickListener)
    .setOnItemLongClickListener(itemLongClickListener)
    .setOnActionItemClickListener(actionItemClickListener)
    .setParticipantListAdapter(participantListAdapter)
    .build()

MutedMemberListFragment.Builder

Copy link

The following methods have changed names in v3.

From v2

Copy link
KotlinJava
val fragment: Fragment = MutedMemberListFragment.Builder(channelUrl)
    .setHeaderLeftButtonListener(leftButtonListener)
    .setHeaderRightButtonListener(rightButtonListener)
    .setItemClickListener(itemClickListener)
    .setItemLongClickListener(itemLongClickListener)
    .setActionItemClickListener(actionItemClickListener)
    .setMemberListAdapter(memberListAdapter)
    .build()
KotlinJava
val fragment: Fragment = MutedMemberListFragment.Builder(channelUrl)
    .setOnHeaderLeftButtonClickListener(leftButtonListener)
    .setOnHeaderRightButtonClickListener(rightButtonListener)
    .setOnItemClickListener(itemClickListener)
    .setOnItemLongClickListener(itemLongClickListener)
    .setOnActionItemClickListener(actionItemClickListener)
    .setMutedMemberListAdapter(mutedMemberListAdapter)
    .build()

OperatorListFragment.Builder

Copy link

The following methods have changed names in v3.

From v2

Copy link
KotlinJava
val fragment: Fragment = OperatorListFragment.Builder(channelUrl)
    .setHeaderLeftButtonListener(leftButtonListener)
    .setHeaderRightButtonListener(rightButtonListener)
    .setItemClickListener(itemClickListener)
    .setItemLongClickListener(itemLongClickListener)
    .setActionItemClickListener(actionItemClickListener)
    .setUserListAdapter(userListAdapter)
    .build()
KotlinJava
val fragment: Fragment = OperatorListFragment.Builder(channelUrl)
    .setOnHeaderLeftButtonClickListener(leftButtonListener)
    .setOnHeaderRightButtonClickListener(rightButtonListener)
    .setOnItemClickListener(itemClickListener)
    .setOnItemLongClickListener(itemLongClickListener)
    .setOnActionItemClickListener(actionItemClickListener)
    .setOperatorListAdapter(operatorListAdapter)
    .build()

ModerationFragment.Builder

Copy link

The following methods have changed names in v3.

From v2

Copy link
KotlinJava
val fragment: Fragment = ModerationFragment.Builder(channelUrl)
    .setHeaderLeftButtonListener(leftButtonListener)
    .build()
KotlinJava
val fragment: Fragment = ModerationFragment.Builder(channelUrl)
    .setOnHeaderLeftButtonClickListener(leftButtonListener)
    .build()

MessageSearchFragment.Builder

Copy link

The following methods have changed names in v3.

From v2

Copy link
KotlinJava
val fragment: Fragment = MessageSearchFragment.Builder(channelUrl)
    .setItemClickListener(itemClickListener)
    .build()
KotlinJava
val fragment: Fragment = MessageSearchFragment.Builder(channelUrl)
    .setOnItemClickListener(itemClickListener)
    .build()