Skip to content

Instantly share code, notes, and snippets.

@AlankritaShah
Created October 27, 2022 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlankritaShah/575ab9bb88590c36a05311c2e5db9a37 to your computer and use it in GitHub Desktop.
Save AlankritaShah/575ab9bb88590c36a05311c2e5db9a37 to your computer and use it in GitHub Desktop.
@Composable
fun ComposeQuadrants() {
Column(modifier = Modifier.fillMaxSize()) {
Row(Modifier.weight(1F)) {
ComposeQuadrant(
color = Color.Green,
head = "Text composable",
body = "Displays text and follows Material Design guidelines.",
modifier = Modifier.weight(1f)
)
ComposeQuadrant(
color = Color.Yellow,
head = "Image composable",
body = "Creates a composable that lays out and draws a given Painter class object.",
modifier = Modifier.weight(1f)
)
}
Row(Modifier.weight(1F)) {
ComposeQuadrant(
color = Color.Cyan,
head = "Row composable",
body = "A layout composable that places its children in a horizontal sequence.",
modifier = Modifier.weight(1f)
)
ComposeQuadrant(
color = Color.LightGray,
head = "Column composable",
body = "A layout composable that places its children in a vertical sequence.",
modifier = Modifier.weight(1f)
)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment