Philip Blandford
04/25/2021, 11:55 AM@Composable
@Preview
private fun InsetsTest() {
val activity = LocalContext.current as Activity
WindowCompat.setDecorFitsSystemWindows(activity.window, false)
MaterialTheme {
ProvideWindowInsets {
val text = remember { mutableStateOf("") }
Column(
Modifier
.fillMaxSize()
.background(Color.White)
) {
Box(
Modifier
.fillMaxWidth()
.weight(1f)
.background(Color.LightGray)
)
Column(
Modifier
.navigationBarsWithImePadding()
.background(Color.Yellow)) {
BasicTextField(
text.value,
{ text.value = it },
Modifier
.fillMaxWidth()
.heightIn(50.dp)
)
Box(Modifier.height(50.dp))
}
}
}
}
}
cb
04/25/2021, 6:35 PMcb
04/25/2021, 6:36 PM