Created
October 19, 2021 12:18
-
-
Save victorbrndls/168868fe2607f2b314f6e153d32af80c to your computer and use it in GitHub Desktop.
This file contains 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
ConstraintLayout { | |
val (button, text) = createRefs() | |
Button( | |
modifier = Modifier.constrainAs(button) { | |
top.linkTo(parent.top, margin = 16.dp) | |
} | |
) | |
Text("Text", Modifier.constrainAs(text) { | |
top.linkTo(button.bottom, margin = 16.dp) | |
}) | |
} | |
ConstraintSet { | |
val button = createRefFor("button") | |
val text = createRefFor("text") | |
constrain(button) { ... } | |
constrain(text) { ... } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment