vendredi 15 mai 2015

Saving activity state after calling another activity through intent

I have two activities:

Activity A-->the onCreate() method interacts with a database and shows data in the Activity.

Activity B (generic)

Now,in my Activity A,I have a button that,through a Intent,brings me to Activity B;the same Intent is found in the Activity B to go back from B to A.

Here's the problem:when i go back from B to A,the onCreate method is called again,and the data is taken from the database again. Is there a way I can go from Activity B to A without having to take data again from the database,maybe 'saving' the state of the Activity A?

Thank you.

Aucun commentaire:

Enregistrer un commentaire