Ian Warwick
01/22/2021, 10:20 AMBox
in a Box
and I want to offset the inner box by x
dps from the left, I tried left padding and offset though nothing seems to work
Box(Modifier.background(Color.Red).width(128.dp).height(128.dp)) {
Box(Modifier.background(Color.Green).width(32.dp).height(128.dp)) {
}
}
I want the inner box to have some space on the left hand size that I can specify hope that makes senseallan.conda
01/22/2021, 10:26 AMIan Warwick
01/22/2021, 10:28 AMallan.conda
01/22/2021, 10:29 AMIan Warwick
01/22/2021, 10:29 AMBox(Modifier.background(Color.Red).width(128.dp).height(128.dp)) {
Box(Modifier.background(Color.Green).width(32.dp).height(128.dp).offset(32.dp)) {
}
}
and I get this in Previewallan.conda
01/22/2021, 10:31 AMIan Warwick
01/22/2021, 10:32 AMallan.conda
01/22/2021, 10:32 AMIan Warwick
01/22/2021, 10:32 AMallan.conda
01/22/2021, 10:32 AMIan Warwick
01/22/2021, 10:32 AMallan.conda
01/22/2021, 10:33 AMIan Warwick
01/22/2021, 10:33 AMallan.conda
01/22/2021, 10:33 AMIan Warwick
01/22/2021, 10:33 AM