sindrenm
02/07/2018, 7:08 PMoperator fun View.invoke(init: ViewConstraintBuilder.() -> Unit) = id.invoke(init)
It's so simple, yet so incredibly smart! Making every instance of View
invokable with a lambda allowing us to do this:
val myToolbar = toolbar()
myToolbar {
connect(
START to START of PARENT_ID,
TOP to TOP of PARENT_ID,
END to END of PARENT_ID
)
}