Anyone have a good idea on how to avoid that the c...
# compose
h
Anyone have a good idea on how to avoid that the checkbox gets pushed to the right here?
Copy code
Row(
    modifier = Modifier.fillMaxWidth(),
    horizontalArrangement = Arrangement.SpaceBetween,
) {
    Row(
        verticalAlignment = Alignment.CenterVertically,
    ) {
        IconButton(
            modifier = modifier,
            onClick = { onExpanded(routine.id) },
            content = {
                Icon(
                    painter = painterResource(id = R.drawable.round_keyboard_arrow_down_24),
                    contentDescription = "Expandable Arrow",
                    modifier = Modifier.rotate(arrowRotationDegree),
                )
            }
        )
        Text(
            text = routine.title,
            style = MaterialTheme.typography.bodyLarge,
            fontWeight = FontWeight.Bold,
            maxLines = 1,
            overflow = TextOverflow.Ellipsis,
        )
    }
    Checkbox(
        checked = routine.completedToday,
        onCheckedChange = { onRoutineClicked(routine.id) }
    )
}
a
What you set the a weight on the row with the text and icon?
l
Copy code
Row {
    IconButton()
    Text(Modifier.weight(1.0f))
    Checkbox()
}