constrain

Creates a ConstraintLayout that constrains a single View.

Return

Layout that constrains the given view

Parameters

a

View being constrained

constraints

with constraint details


Creates a ConstraintLayout that constrains 2 Views.

Return

Layout that constrains the given views

Parameters

a

first View being constrained

b

second View being constrained

constraints

with constraint details


Creates a ConstraintLayout that constrains 3 Views.

Return

Layout that constrains the given views

Parameters

a

first View being constrained

b

second View being constrained

c

third View being constrained

constraints

with constraint details


Creates a ConstraintLayout that constrains 4 Views.

Return

Layout that constrains the given views

Parameters

a

first View being constrained

b

second View being constrained

c

third View being constrained

d

fourth View being constrained

constraints

with constraint details


Creates a ConstraintLayout that constrains 5 Views.

Return

Layout that constrains the given views

Parameters

a

first View being constrained

b

second View being constrained

c

third View being constrained

d

fourth View being constrained

e

fifth View being constrained

constraints

with constraint details


fun constrain(a: View, b: View, vararg others: View, constraints: ConstraintDslContext.(List<Bounds>) -> Unit): ConstraintLayout

Creates a ConstraintLayout that constrains several Views.

Return

Layout that constrains the given views

Parameters

a

first View being constrained

b

remaining Views being constrained

constraints

with constraint details