The View Binding usage inside the app's Fragments is a bit complicated and repetitive.
private var _binding: FragmentMainBinding? = null
private val binding: FragmentMainBinding get() = _binding!!
onDestroyView in order to unbind the view:override fun onDestroyView() {
super.onDestroyView()
_binding = null
}
My suggestion is to create a lifecycle-aware delegated property that automatically unbinds the view during onDestroyView. As a nice side-effect, we would be able to remove the _binding property.
The implementation would be similar to https://proandroiddev.com/make-android-view-binding-great-with-kotlin-b71dd9c87719
_binding = null statements.Internal Tracking ID: EXPOSUREAPP-1926
Hi @pwoessner
Any updates from your side regarding this issue/pr?
Hey @henriquenfaria sorry for the late response here. We are currently working hard on finalizing the next release. I have re-assigned the issue to make sure it gets in the hand of the right people soon.
Best regards,
SG
Corona-Warn-App Open Source Team
No problem @svengabr :)
Let me know if you need my help to rebase/update my PR.
Most helpful comment
No problem @svengabr :)
Let me know if you need my help to rebase/update my PR.