Justin Xu
04/04/2023, 2:44 AMModifier.weight(1f, false)
for the content on the right. How do I make sure that the buttons are fully rendered, and any content on the left wraps accordingly?Albert Chang
04/04/2023, 3:22 AMAlbert Chang
04/04/2023, 3:23 AMJustin Xu
04/04/2023, 3:24 AMColumn(
verticalArrangement = Arrangement.SpaceAround,
horizontalAlignment = Alignment.CenterHorizontally,
modifier = Modifier.fillMaxHeight()
) {
Box(
contentAlignment = Alignment.Center,
modifier = Modifier
.clip(AppTheme.shapes.circleShape)
.background(AppTheme.colors.caption)
.clickable(onClick = acceptOnClick)
.padding(AppTheme.dimensions.paddingSmall)
) {
SmallIcon(
imageVector = Icons.Default.Check,
contentDescription = "Accept",
tint = AppTheme.colors.confirm
)
}
Box(
contentAlignment = Alignment.Center,
modifier = Modifier
.clip(AppTheme.shapes.circleShape)
.background(AppTheme.colors.caption)
.clickable(onClick = rejectOnClick)
.padding(AppTheme.dimensions.paddingSmall)
) {
SmallIcon(
imageVector = Icons.Default.Close,
contentDescription = "Reject",
tint = AppTheme.colors.deny
)
}
}
Notification Row
Row(
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = <http://Alignment.Top|Alignment.Top>,
modifier = modifier
.fillMaxWidth()
.height(IntrinsicSize.Min)
.padding(end = AppTheme.dimensions.paddingSmall)
) {
Row() {
... notification text ...
}
if (sideContent != null) {
Row(modifier = Modifier.weight(1f, false)) {
sideContent() // Where side content is the accept/reject buttons
}
}
}
Justin Xu
04/04/2023, 3:26 AMAlbert Chang
04/04/2023, 3:29 AMJustin Xu
04/04/2023, 3:33 AM