Last active
September 10, 2018 12:47
-
-
Save Lamartio/d598865761ab79f92301ad46f0f3ff07 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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