ViewFactory

fun <B : ViewDataBinding> ViewFactory(inflateFunction: (LayoutInflater, container: ViewGroup?, attachToContainer: Boolean) -> B, bindDataFunction: (B) -> Unit? = null)

Parameters

inflateFunction

A function that will inflate a view given a layout inflater, a container view, and whether the view should be attached to the container upon inflation. Matches the signature of a generated data binding class's inflate.

bindDataFunction

A function that will be called after view inflation, and can be used to bind data to the view.