UIKit Android v3
UIKit Android
UIKit
Android
Home
/
UIKit
/
Android
/
Key functions
This is the new Docs for UIKit v3 for Android. To see the previous Docs, click here.

List muted participants

A muted participant list is a complete list of members that are muted in an open channel. Only an operator of the channel can mute participants. The muted participant list is created through OpenChannelMutedParticipantListActivity or OpenChannelMutedParticipantListFragment.


Muted participant list screen

A muted participant list screen is composed of three components: header, muted participant list, and muted participant list status.

Header

The header component shows the default title of the muted participant list screen as Muted participants. It also has a button on the left corner of the header. When the left button is tapped, the finish() method of the activity is called to exit the screen. The view of the header is created and customized in the HeaderComponent of the OpenChannelMutedParticipantListModule.

Muted participant list

The muted participant list component shows a list of profile images and names of all muted participants in the channel. The view of the muted participant list is created and customized in the MutedUserListComponent of the OpenChannelMutedParticipantListModule. You can also customize each item in the list view using OpenChannelMutedParticipantListAdapter.

Muted participant list status

The muted participant list status component shows the result of the data request for a muted participant list. The StatusComponent exists in the OpenChannelMutedParticipantListModule and lets the user know if the list is loading or if the list could not be called.


Usage

UIKit for Android provides both activity and fragment to create a muted participant list screen. You can choose which one to build your app with and you may solely use activity instead of fragment if you wish to. You can build a muted participant list screen through OpenChannelMutedParticipantListActivity, which uses UIKitFragmentFactory to create views.

Start an activity

You can start an activity by using intent to move from one activity to OpenChannelMutedParticipantListActivity as shown below:

Intent intent = OpenChannelMutedParticipantListActivity.newIntent(context, "channel_url");
startActivity(intent);

Create a fragment

OpenChannelMutedParticipantListActivity allows you to create a basic OpenChannelMutedParticipantListFragment through UIKitFragmentFactory and OpenChannelMutedParticipantListFragment.Builder. UIKitFragmentFactory has a set of methods that build each fragment, whereas the builder class provides APIs to customize the UI of the data and event handlers used in OpenChannelMutedParticipantListFragment. To see all APIs of OpenChannelMutedParticipantListFragment.Builder, refer to the API reference page.

OpenChannelMutedParticipantListFragment fragment = new OpenChannelMutedParticipantListFragment.Builder("channel_url").build();

Note: To use UIKit's fragments as a nested fragment, refer to the Android Developer Documentation's Nested Fragments.


Customization

In the list muted participants key function, you can customize OpenChannelMutedParticipantListFragment to change different parts of the screen. The OpenChannelMutedParticipantListFragment.Builder class allows you to create and customize the basic OpenChannelMutedParticipantListFragment that UIKit provides but you can only change its own APIs, such as setting a layout. If you wish to customize the fragment beyond using the APIs provided in the builder, you must inherit new customization methods.

The following table shows the main classes used in OpenChannelMutedParticipantListFragment to display and customize the muted participant list screen.

FragmentModuleComponentStyleRecyclerView

OpenChannelMutedParticipantListFragment

OpenChannelMutedParticipantListModule

HeaderComponent

OpenChannelMutedParticipantListComponent

StatusComponent

Module.OpenChannelMutedParticipantList

OpenChannelMutedParticipantListAdapter

Depending on the UI or the feature you wish to customize in the fragment, you can change the classes mentioned in the table. To learn how to customize the fragment, follow the links to Customization listed below:

Note: The links to the above customization pages provide an example of how to customize classes related to ChannelFragment. In order to make changes to the muted participant list, you must use the correct classes.