This is my scenario:
Activity 1, Is where I have a list with items.
Activity 1 contains an object of Class A, which deals with getting and returning a cursor of data retrieved by an SQLite database, via a Loader Manager set up, to Activity 1.
In Activity 1, Each of these views within the list have buttons. When pressing a button,
Class B is executed.
Class B changes a single value within the SQLite database.
In Class B, How can I notify the Loader Manager that the data has changed, for it to refresh the cursor. Remember, The Loader Manager is set up in Class A.
Essentially, If the above didn’t make sense,
I need to refresh the cursor as the underlying sql data has changed, but I need to do this from a class that has not a direct connection to the loader manager.
You can have both classes have access to each other , say in your onCreate in Activity1
and inside your ClassB code, after you’re done with updating the db you can just call a method in classA to update the cursor.
something a long the line of :
I hope that makes sense