Created
December 13, 2023 13:44
-
-
Save akwasiio/77d8d56a089cf4c3fe257e97a31fe790 to your computer and use it in GitHub Desktop.
A random box I was asked to build lol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun RandomBox() { | |
Row( | |
verticalAlignment = Alignment.CenterVertically, | |
modifier = Modifier | |
.height(IntrinsicSize.Min) | |
.padding(100.dp) | |
.border(width = 1.dp, shape = RoundedCornerShape(6.dp), color = Color.Gray) | |
) { | |
for (i in 1..4) { | |
Column( | |
modifier = Modifier.weight(1f), | |
horizontalAlignment = Alignment.CenterHorizontally | |
) { | |
Text(text = "q$i") | |
Divider() | |
Text(text = if (i % 2 == 0) "35" else "25") | |
} | |
if (i < 4) { | |
Divider( | |
modifier = Modifier | |
.fillMaxHeight() | |
.width(1.dp) | |
) | |
} | |
} | |
} | |
} | |
@Preview(showBackground = true) | |
@Composable | |
fun RandomBoxPreview() { | |
ScreenshotDetectionSandboxTheme { | |
RandomBox() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment