I need to remove a Firebase Listener when the app closed or a fragment with a ListView was detach, in RecyclerView the approach is usually set the adapter to null to call onViewDetachedFromWindow()
and onDetachedFromRecyclerView()
but how to do it in ListView specially when my listener is inside BaseAdapter? I prefer to use ListView for a specific libary.
Asked
Active
Viewed 59 times
0

Mihae Kheel
- 2,441
- 3
- 14
- 38
-
Please check the duplicate to see how you can remove the listener according to your activity life-cycle. – Alex Mamo Nov 13 '18 at 16:53
-
1My scenario is different, I will update my question. – Mihae Kheel Nov 16 '18 at 16:19