androidbroadcast / ViewBindingPropertyDelegate

Make work with Android View Binding simpler
https://proandroiddev.com/make-android-view-binding-great-with-kotlin-b71dd9c87719
Apache License 2.0
1.43k stars 102 forks source link

Can't access the Fragment View's LifecycleOwner when getView() is null #19

Closed InsaneDoggo closed 4 years ago

InsaneDoggo commented 4 years ago

You can't access viewLifecycleOwner when view is null. Check should be inverted i.e. !=

return if (thisRef.view == null) thisRef.viewLifecycleOwner else thisRef

https://github.com/kirich1409/ViewBindingPropertyDelegate/blob/master/vbpd/vbpd-noreflection/src/main/java/by/kirich1409/viewbindingdelegate/DialogFragmentViewBindings.kt#L16

kirich1409 commented 4 years ago

This isn't mistake. It's handling case when an DialogFragment has custom view or not