Closed dpproduction closed 3 years ago
Why do you need that? viewBinding has lazy like behaviour by default
Hm, I need it because of using AsyncLayoutInflater. onCreateView of fragment returns only empty container, then main view has async inflated and added to this container.
You can use base delegate and ovveride how to create view from for ViewBinding. Look for the overload
Is there any way to init viewBinding with lazy statement ? Have tried by this way
private val viewBinding by lazy { viewBinding( FragmentGraphContentBinding::bind ) }
But in this case viewBinding has type ViewBindingProperty<ChannelsGraphFragment, FragmentGraphContentBinding> And I don't understand how to use it for getting views.