Untitled
unknown
plain_text
a year ago
565 B
8
Indexable
// Needs to be on a Surface
@Composable
fun TopLeftQuadrantBox() {
Box(
modifier = Modifier
.fillMaxWidth(0.5f) // Fill 50% of the width
.fillMaxHeight(0.5f) // Fill 50% of the height
.background(Color.Blue) // Background color for visibility
.align(Alignment.TopStart) // Align to the top end (left)
) {
// Content inside the Box
Text(
text = "Top Left Quadrant",
modifier = Modifier.align(Alignment.Center) // Center the text within the Box
)
}
}
Editor is loading...
Leave a Comment