-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inheritance in fragments & ButterKnife #630
Comments
If you make a Here is an example:
Then in your subclass:
|
Can't they both go into the superclass? |
You only need to hold the unbinder in the base fragment. Not in any of the subclasses. Reflection looks up the most specific view binder thus the returned unbinder will unbind the entirety of the views in the type hierarchy. |
I have a question about Fragment inheritance. For example, I have an BaseFragment with some binded views. Also, I have an ExtendedBaseFragment, which also has his own binded views. It is correct to unbind only in parent class (BaseFragment) or not? In this situation, in onDestroyView() unbinder is already is null. Why?
The text was updated successfully, but these errors were encountered: