Created
September 10, 2018 11:53
-
-
Save Lamartio/f96ea1865aa083e3ad97816895febbf1 to your computer and use it in GitHub Desktop.
This file contains 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 { | |
// ... | |
} | |
infix fun <V : ViewGroup> V.layout(block: Layout<V>.() -> Unit): V = | |
also { Layout(it).run(block) } | |
class Layout<V : ViewGroup>(val layout: V) : ViewManager by layout, ViewParent by layout {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment