Skip to content

Instantly share code, notes, and snippets.

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 Lamartio/d598865761ab79f92301ad46f0f3ff07 to your computer and use it in GitHub Desktop.
Save Lamartio/d598865761ab79f92301ad46f0f3ff07 to your computer and use it in GitHub Desktop.
LinearLayout(this) layout {
+TextView(context) {
text = "Hello world"
}
}
class Layout<V : ViewGroup>(val layout: V) : ViewManager by layout, ViewParent by layout {
// ...
operator fun <V : View> V.invoke(block: V.() -> Unit): V =
also(block)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment