ViewBindingPropertyDelegate
ViewBindingPropertyDelegate copied to clipboard
Crash in DialogFragment. ID does not reference a View inside this View
I am using this library 1.4.5 version.
With this function
public inline fun <F : Fragment, T : ViewBinding> Fragment.viewBinding( crossinline vbFactory: (View) -> T, @IdRes viewBindingRootId: Int )
And working in activity and fragment.
When using in DialogFragment.
The app crash when I try to use viewBinding instance in onViewCreated callback.
After some investigated, found the dialog contentView will be set in onActivityCreated which is called after onViewCreated.
But the delegate will get the view from dialog inside.
Is that a bug? Please give some suggestions, thanks.