We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ConstraintSet can be initialized from a JSON string:
{ g1: { type: 'vGuideline', start: 80 }, button: { top: ['title', 'bottom', 16], start: ['g1', 'start'] }, title: { centerVertically: 'parent', start: ['g1', 'start'] } }
Is the equivalent to the Kotlin DSL:
ConstraintSet { val button = createRefFor("button") val title = createRefFor("title") val g1 = createGuidelineFromStart(80.dp) constrain(button) { top.linkTo(title.bottom, 16.dp) start.linkTo(g1) } constrain(title) { centerVerticallyTo(parent) start.linkTo(g1) } },
The overall syntax is as follow:
<id> : { <constraints> }
With following the pattern:
<from anchor> : [ '<target id>', '<target anchor>', <margin> ]