This repository has been archived by the owner on Jun 20, 2023. It is now read-only.
Simplify Fragments view unbinding code #927
Labels
enhancement
Improvement of an existing feature
mirrored-to-jira
This item is also tracked internally in JIRA
Milestone
Avoid duplicates
Current Implementation
The View Binding usage inside the app's Fragments is a bit complicated and repetitive.
onDestroyView
in order to unbind the view:Suggested Enhancement
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
Expected Benefits
_binding = null
statements.Internal Tracking ID: EXPOSUREAPP-1926
The text was updated successfully, but these errors were encountered: