I succeeded in making what I want previously. But I only called the method startListening() to recyclerAdapter. When should I call the method stopListening()?? Is there any disadvantage if not call the stopListening() method?
Asked
Active
Viewed 40 times
1 Answers
0
You can call stopListening()
at onDetachedFromRecyclerView(RecyclerView recyclerView)
method of recyclerViewAdapter
.
@Override
public void onDetachedFromRecyclerView(RecyclerView recyclerView) {
stopListening();
}

Santanu Sur
- 10,997
- 7
- 33
- 52