You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Hi. Currently as I understand everything correctly we cleaning up views in onDestroyView method. Here was as I remember one of the latest discussion about this topic.
I agree with proposals, but could we enhance it a little bit? Currently we can hang listeners to views through bunch of annotations (for example @OnFocusChange). The question is: can we release those listeners (which we added by annotations) before cleaning up views?
Sounds like a good idea. But it looks like it might become a bit complicated
from what i found from a short time of googling:
some listeners (e.g.) focus can be removed by calling setOnFocusChangeListener with null
-but others (e.g.) text change listener work on a add/remove mechanic so we have to store the handler here
We have to add a new method to ListenerHandler, generateRemoveListener() or sg like this, and implement it in each listener. And yeah, we have to store the listeners in a field. :(
Activity
WonderCsabo commentedon Nov 23, 2016
We should definitely do this. However when we should cleanup in case of
@EView(Group)and@EActivity. @dodgex wdyt?dodgex commentedon Nov 23, 2016
Sounds like a good idea. But it looks like it might become a bit complicated
from what i found from a short time of googling:
setOnFocusChangeListenerwithnull-but others (e.g.) text change listener work on a add/remove mechanic so we have to store the handler here
WonderCsabo commentedon Nov 23, 2016
We have to add a new method to
ListenerHandler,generateRemoveListener()or sg like this, and implement it in each listener. And yeah, we have to store the listeners in a field. :(It is a bigger task.