Mario Adam
05/18/2023, 9:56 AMBoxWithConstraints - but whatever I am doing: preview tells me something about infinite and such when adding verticalScroll .Mario Adam
05/18/2023, 9:57 AM@Composable
fun ParcelInfo(
modifier: Modifier = Modifier,
navigator: INavigationProvider? = null,
uiState: IViewState.Data<ParcelInfoViewState>
) {
var expanded by remember { mutableStateOf(true) }
Column(modifier.fillMaxSize(), Arrangement.SpaceBetween, Alignment.Start) {
Column(Modifier.fillMaxWidth().weight(1f)) {
ParcelInfoHeaderData(data = uiState.value.parcelInfo)
Button(
modifier = Modifier
.fillMaxWidth()
.minimumInteractiveComponentSize(),
colors = ButtonDefaults.buttonColors(
backgroundColor = colorResource(R.color.lightGray),
contentColor = colorResource(R.color.grayed)
),
onClick = {
expanded = !expanded
}
) {
Text(text = stringResource(R.string.toggleDetails))
}
AnimatedVisibility(visible = expanded) {
ParcelInfoDetailData(data = uiState.value.parcelInfo)
}
}
Button(
modifier = Modifier
.fillMaxWidth()
.minimumInteractiveComponentSize(),
onClick = {
navigator?.navigateUp()
}
) {
Text(text = stringResource(R.string.back))
}
}
}Sean Proctor
05/18/2023, 12:48 PM.verticalScroll() modifier to the inner Column?Sean Proctor
05/18/2023, 12:50 PM.fillMaxHeight() modifier or something along those lines.Mario Adam
05/18/2023, 1:28 PM.fillMaxSize for some Box nested within a Row with modifier height(intrinsicSize = IntrinsicSize.Max) to achieve equal height for all boxes within a rowMario Adam
05/18/2023, 1:28 PMLazyColumn)Sean Proctor
05/18/2023, 1:35 PMColumn for the table. Alternatively, put the header information inside the LazyColumn of the table.Sean Proctor
05/18/2023, 1:41 PMMario Adam
05/19/2023, 7:17 AMfillMaxSize it didn’t work - until I changed the `LazyColumn`used in the list to a `Column`with a .forEach inside. As the displayed data is already know in its full extend at display time, this is absolutely OK for me. And after that change I was able to successfully implement the `BoxWithConstraint`and verticalScroll