BindingCreator

sealed class BindingCreator<T : ViewBinding>(source)

Sealed class representing the two strategies for creating a ViewBinding instance.

Inheritors

Constructors

Link copied to clipboard
protected constructor()

Types

Link copied to clipboard
class Bind<T : ViewBinding>(val fn: (View) -> T) : BaseFragment.BindingCreator<T>

Use bind() on an existing root view to create the binding. This should be used if you are differing per device layouts, such as different layouts for TV and Phone.

Link copied to clipboard
class Inflate<T : ViewBinding>(val fn: (LayoutInflater, ViewGroup?, Boolean) -> T) : BaseFragment.BindingCreator<T>

Use the standard inflate() method for creating the binding.