Archie
02/26/2021, 12:30 PM@Composable
fun TopAppBar(
title: @Composable () -> Unit,
modifier: Modifier = Modifier,
navigationIcon: @Composable (() -> Unit)? = null,
actions: @Composable RowScope.() -> Unit = {},
backgroundColor: Color = MaterialTheme.colors.primarySurface,
contentColor: Color = contentColorFor(backgroundColor),
elevation: Dp = AppBarDefaults.TopAppBarElevation
) {
...
}
Doesn't expose contentPadding
? Is it possible to request exposing the content padding to adding addition padding for WindowInsets
would be easier?annsofi
02/26/2021, 12:59 PMVivek Sharma
02/26/2021, 1:00 PMChrisBanes Insets library
if you want it explicitly, it has some functions regarding paddingArchie
02/26/2021, 1:51 PMcontentPadding
would solve the issue without doing much work unless there's a specific reason for it not being exposed. Don't you think so?annsofi
02/26/2021, 1:54 PMArchie
02/26/2021, 1:56 PMAdam Powell
02/26/2021, 3:28 PMTopAppBarLayout
composable that doesn't include an inner Surface
at all, and have TopAppBar
call it. Adding parameters in the vein of contentPadding
is not sustainable for most composables and it's better to offer the building blocks beneath where parameters like that would be used to remix however you wish instead.Archie
02/26/2021, 4:59 PMAdam Powell
02/26/2021, 5:00 PMArchie
02/26/2021, 5:02 PM@Composable
fun TopAppBar(
modifier: Modifier = Modifier,
backgroundColor: Color = MaterialTheme.colors.primarySurface,
contentColor: Color = contentColorFor(backgroundColor),
elevation: Dp = AppBarDefaults.TopAppBarElevation,
contentPadding: PaddingValues = AppBarDefaults.ContentPadding,
content: @Composable RowScope.() -> Unit
) {
...
}
Will this get affected as well? since it exposes contentPadding
?