Shariff
11/15/2024, 5:47 PMShariff
11/15/2024, 9:09 PMval scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior()
val scrollState = rememberLazyListState()
Scaffold(
topBar = {
TopAppBar(
title = { Text("Hello Top Bar") },
scrollBehavior = scrollBehavior
)
},
contentWindowInsets = ScaffoldDefaults
.contentWindowInsets
.exclude(WindowInsets.navigationBars)
.exclude(WindowInsets.ime),
modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection),
content = { paddingValues ->
Column(Modifier.fillMaxSize().padding(paddingValues)) {
LazyColumn(modifier = Modifier.weight(1f).fillMaxSize(), state = scrollState) {
items(150) {
Text(text = "Item $it")
}
}
val textState = remember { mutableStateOf("Enter text here...") }
OutlinedTextField(
value = textState.value,
onValueChange = { textState.value = it },
modifier = Modifier
.navigationBarsPadding().imePadding()
)
}
}
)
Arsildo Murati
11/16/2024, 12:15 PMArsildo Murati
11/16/2024, 12:16 PMArsildo Murati
11/16/2024, 12:17 PMArsildo Murati
11/16/2024, 12:17 PMShariff
11/19/2024, 5:41 AMArsildo Murati
11/19/2024, 8:22 PM