I have two activitys. Activity A e Activity B.
I have editText’s with data inside Activity A. I pass to activity B.
But when i try to pass activity B to A, activity A restart and I lose the data in edittext. How I can pass of B to A with data inside A?
Here is my code in activity B. But doesn’t work
Intent afectarQuotaSocios = new Intent(B.this,A.class);
afectarQuotaSocios.putExtra("ArrayListIdSocios",al);
afectarQuotaSocios.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(afectarQuotaSocios);
Any ideas?
Thanks for your help
You should use
to start a subactivity. Like in case of yours, its B.
To Return result from an activity to its super activity, call
setResult();methodand get returned result in superactivity, in callback method,
onActivityResult()