Created
September 10, 2018 12:08
-
-
Save Lamartio/97be461ec8d4bb176e3f99706db49c7e 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