1 min readMay 5, 2020
- A View Binding inside the delegate will be destroyed after
Fragment.onDestroyView()
. - I don’t like classes
BaseFragment
andBaseActivity
. I prefer to delegate instead of subclasses. You can have pain with inheritance when can’t useBaseFragment
. - Part of my code use reflection, but it can be removed (I’ve provided interface in the place where reflection is used). Delegated properties use it too, but it will be optimized in Kotlin 1.4.
It’s only my vision of the solution. It works for me and was tested by whole team.
Thanks for the good feedback