ViewProvider

constructor(lifecycleOwner: LifecycleOwner, layoutProvider: LayoutProvider<T>)

Use InflateViewFactory to inflate a layout based on a layout ID provided by layoutProvider for each TtPriorityLayout item and optionally for the overflow indicator.

If the view inflated for TtPriorityLayout item has a viewModel data binding variable, and its type matches with T, the variable is set to the TtPriorityLayout item. It is not mandatory to have a viewModel data binding variable.

If the overflow indicator view has a viewModel data binding variable, and it type matches with the type of TtPriorityLayout.ttOverflowIndicatorContent, the variable is set to the TtPriorityLayout.ttOverflowIndicatorContent value.


constructor(lifecycleOwner: LifecycleOwner, layoutId: Int)

Convenience constructor to create a view provider that provides the same layout ID for all items.

If the view inflated for TtPriorityLayout item has a viewModel data binding variable, and its type matches with T, the variable is set to the TtPriorityLayout item. It is not mandatory to have a viewModel data binding variable.


constructor(lifecycleOwner: LifecycleOwner, itemViewFactoryProvider: (T) -> ViewFactory<T>, overflowIndicatorViewFactoryProvider: (Any?) -> ViewFactory<Any?>?)