Customization
This guide explains how to customize layers of Sendbird UIKit for Jetpack Compose and demonstrate the specific customization options for each layer and screen as follows:
Screen customization
Follow these steps to customize the Sendbird UIKit for Jetpack Compose:
Step 1 Find screen to customize
Select the screen you want to customize from the UIKit for Jetpack Compose screens below.
- ChannelScreen
- ChannelsScreen
- ChannelCreationScreen
- InvitationUserScreen
- MembersScreen
- ChannelSettingsScreen
Step 2 Find parameters for the screen
Find the parameters needed to customize the screen. The example below customizes the channelItem
in the ChannelsScreen
.
Note: When changing the parameters of a
Composable
function, useMaterialTheme
as much as possible. This will help you create a consistent UI. If you find it difficult to configure the UI you want using parameters, consider creating aComposable
directly using the components provided by UIKit. You can find the components in the Component API reference.
Step 3 Inject custom screen
Inject the custom screen into the UIKit for Jetpack Compose screen using sendbirdGroupChannelNavGraph
. The example below injects the ChannelsScreenExample
into the ChannelsScreen
.
Note: To learn how to integrate Sendbird navigation, see Navigation.
Data customization
UIKit for Jetpack Compose provides a way to customize data: use repositories. This allows you to use the data provided by UIKit for Jetpack Compose in your ViewModel
. To connect this data to a Composable
, pass the ViewModel
as a parameter when calling the Composable
.
Repositories
UIKit for Jetpack Compose provides the following repositories:
ChannelCreationScreenResourceRepository
ChannelScreenResourceRepository
ChannelSettingsScreenResourceRepository
ChannelsScreenResourceRepository
MembersScreenResourceRepository
UserInvitationScreenResourceRepository
Delegate repositories
You can create a custom repository by delegating one of the default repositories provided by UIKit for Jetpack Compose. The example below shows how to use the ChannelsScreen
repository.
Use customizable models
UIKit for Jetpack Compose allows you to customize the Model
s used in the composables. UIKit for Jetpack Compose provides customizable Model
s for UikitGroupChannel
, UikitUser
, UikitBaseMessage
, and other models used in composables. The example below demonstrates how to customize the UikitGroupChannel
.
Note: To learn more about the
ViewModel
s provided by UIKit for Jetpack Compose, see the User API reference, Group channel API reference, and Message API reference.