Hristijan
10/15/2024, 6:42 PMHristijan
10/15/2024, 6:43 PMval topAppBarScrollBehavior = TopAppBarDefaults.enterAlwaysScrollBehavior()
Scaffold(
contentWindowInsets = WindowInsets(0),
modifier = Modifier
.fillMaxSize()
.nestedScroll(topAppBarScrollBehavior.nestedScrollConnection),
topBar = {
Box(
Modifier
.fillMaxWidth()
.padding(top = 16.dp)
) {
TopAppBar(
colors = TopAppBarDefaults.topAppBarColors(
scrolledContainerColor = Color.Transparent,
containerColor = Color.Transparent
),
scrollBehavior = topAppBarScrollBehavior,
windowInsets = WindowInsets(0, 0, 0, 0),
title = {
Box(
Modifier.fillMaxWidth()
.height(60.dp)
.background(Color.Red)
)
},
)
}
},
content = {} }
Hristijan
10/15/2024, 7:01 PMHristijan
10/15/2024, 7:23 PM// A title inset when the App-Bar is a Medium or Large one. Also used to size a spacer when the // navigation icon is missing. private val TopAppBarTitleInset = 16.dp - TopAppBarHorizontalPadding
private val TopAppBarHorizontalPadding = 4.dp
😓