I would like to be able to send an ArrayList that is populated from data in an SQLite database around several Android activities without having to repopulate the array every time one activity ends and another begins. I want to populate the list originally during the splash screen and either send that list around to be (added to)/(edited)/(removed from) from various activities. The list is created in a DataManager class which creates and populates the ArrayList through a series of methods it contains. I'm concerned that if I create an instance of this DataManager class (e.g. myManager) in the splash screen it will be terminated once the next activity is executed.
Ultimately, my question is:
How do I reference an ArrayList that exists in an instance of a DataManager class so that as I start and finish activities, the new information received from one Activity transfers over to the next?
Aucun commentaire:
Enregistrer un commentaire