JetpackTopAppBar

fun JetpackTopAppBar(@StringRes titleRes: Int, navigationIcon: ImageVector, navigationIconContentDescription: String?, actionIcon: ImageVector, actionIconContentDescription: String?, modifier: Modifier = Modifier, colors: TopAppBarColors = TopAppBarDefaults.centerAlignedTopAppBarColors(), onNavigationClick: () -> Unit = {}, onActionClick: () -> Unit = {})

A Jetpack Compose top app bar with a title, navigation icon, and action icon.

Parameters

titleRes

The string resource ID for the title of the top app bar.

navigationIcon

The navigation icon to be displayed on the top app bar.

navigationIconContentDescription

The content description for the navigation icon.

actionIcon

The action icon to be displayed on the top app bar.

actionIconContentDescription

The content description for the action icon.

modifier

The modifier for this top app bar.

colors

The colors for this top app bar.

onNavigationClick

The callback when the navigation icon is clicked.

onActionClick

The callback when the action icon is clicked.


fun JetpackTopAppBar(@StringRes titleRes: Int, actionIcon: ImageVector, actionIconContentDescription: String?, modifier: Modifier = Modifier, colors: TopAppBarColors = TopAppBarDefaults.centerAlignedTopAppBarColors(), onActionClick: () -> Unit = {})

A Jetpack Compose top app bar with a title and action icon.

Parameters

titleRes

The string resource ID for the title of the top app bar.

actionIcon

The action icon to be displayed on the top app bar.

actionIconContentDescription

The content description for the action icon.

modifier

The modifier for this top app bar.

colors

The colors for this top app bar.

onActionClick

The callback when the action icon is clicked.