Код: Выделить всё
@Composable
fun MediumTopAppBar(
title: @Composable () -> Unit,
modifier: Modifier = Modifier,
navigationIcon: @Composable () -> Unit = {},
actions: @Composable RowScope.() -> Unit = {},
collapsedHeight: Dp = TopAppBarDefaults.MediumAppBarCollapsedHeight,
expandedHeight: Dp = TopAppBarDefaults.MediumAppBarExpandedHeight,
windowInsets: WindowInsets = TopAppBarDefaults.windowInsets,
colors: TopAppBarColors = TopAppBarDefaults.mediumTopAppBarColors(),
scrollBehavior: TopAppBarScrollBehavior? = null
) =
TwoRowsTopAppBar(
modifier = modifier,
title = title,
titleTextStyle = TopAppBarMediumTokens.HeadlineFont.value,
smallTitleTextStyle = TopAppBarSmallTokens.HeadlineFont.value,
titleBottomPadding = MediumTitleBottomPadding,
smallTitle = title,
navigationIcon = navigationIcon,
actions = actions,
collapsedHeight =
if (collapsedHeight == Dp.Unspecified || collapsedHeight == Dp.Infinity) {
TopAppBarDefaults.MediumAppBarCollapsedHeight
} else {
collapsedHeight
},
expandedHeight =
if (expandedHeight == Dp.Unspecified || expandedHeight == Dp.Infinity) {
TopAppBarDefaults.MediumAppBarExpandedHeight
} else {
expandedHeight
},
windowInsets = windowInsets,
colors = colors,
scrollBehavior = scrollBehavior
)
Подробнее здесь: https://stackoverflow.com/questions/794 ... in-any-way