Channel Creation Top Bar
fun ChannelCreationTopBar(selectedUserCount: Int, modifier: Modifier = Modifier, onNavigationIconClick: () -> Unit = {}, onActionClick: () -> Unit = {}, title: @Composable () -> Unit = {
TopBarTitleText(
stringResource(id = R.string.sb_text_header_create_channel),
modifier = Modifier.padding(12.dp)
)
}, navigationIcon: @Composable () -> Unit = {
BackButton(onClick = onNavigationIconClick)
}, action: @Composable () -> Unit = {
SendbirdTextButton(
text = if (selectedUserCount == 0) {
stringResource(id = R.string.sb_text_button_create)
} else {
"${stringResource(id = R.string.sb_text_button_create)} ($selectedUserCount)"
},
onClick = onActionClick,
enabled = selectedUserCount > 0
)
})
The top bar for the ChannelCreationScreen.
Since
1.0.0
Parameters
selected User Count
The number of selected users to display on the top bar's action button.
modifier
The modifier to be applied to the view.
on Navigation Icon Click
The handler for when the navigation icon is clicked.
on Action Click
The handler for when the action is clicked.
title
The title Composable to be displayed on the top bar. Defaults to TopBarTitleText with R.string.sb_text_header_create_channel.
navigation Icon
The icon Composable to be displayed on the top bar's navigation icon. Defaults to BackButton.
action
The action Composable to be displayed on the top bar. Defaults to SendbirdTextButton with user selection count.