https://kotlinlang.org logo
e

edvin

08/24/2017, 6:13 AM
@devanand To include other views or fragment in any layout, simply add them with
add(MyView::class)
. No need to inject them at the top of your class. Your could above doesn't compile I suspect, as
iv
is just a view, not a builder function. You could do
add(iv)
to add that instance of the view as well, but normally there is no need to inject it first and then add it.