sk eat
04/01/2025, 2:14 AMAdBanner
? For example, is there a method to decouple the dynamic AdBanner
height from the scrollable content’s padding so that the scroll state isn’t affected?
@Composable
fun TestComposable() {
val scrollState = rememberScrollState()
Scaffold(
bottomBar = {
// AdBanner height can change dynamically
AdBanner(
modifier = Modifier
.fillMaxWidth()
.heightIn(max = 100.dp)
)
}
) { paddingValues ->
Column(
modifier = Modifier
.fillMaxSize()
// PaddingValues calculated from bottomBar are applied here
.padding(paddingValues)
.verticalScroll(scrollState)
) {
// Scrollable content
}
}
}