I can't figure out how to connect a listener to a separate class called by an activity.
I have My activity, which loads a tabbed view of Fragments. Each Fragment loads its own recycler view
Activity ---> ViewPager(Tabs) ----> Fragments ---> RecyclerView//(This is where I want the listener)
|
|
Background Handler for calling a web server periodically //(I want this to call the listener).
In my mind the RecyclerView and the Handler are different.
I only know how to implement a listener in the class that creates the caller.
How can I add a listener to a class that is not connected to the caller?