Issue
I encountered a problem with my project, when I call startActivity()
it calls the onCreate()
of the other activity, yeah?
Well now, when I finish and destroy that secondary activity
to return back into the MainActivity
, what happens is:
- It doesn't call
onCreate
again (I checked) - Same with
onResume
- Same with
onPause
Wondering what startActivity
is?
startActivity(new Intent(this, SecondaryActivity.class));
To end that activity I call:
try{
super.finishAndRemoveTask();
}catch(Exception e){
super.finish();
}
That's all the details,
I've look into the life cycle already,
can't find it with eyes comparable to an owl.
Solution
Found out an alternative for the alternative,
finishing the MainActivity
after starting the SecondaryActivity
,
and calling onCreate
and vice versa.
I also modified my code to suit my new preferences even more.
If you're still typing in there for the next two days,
thanks for stopping by!
(And sorry for finding my own solution :) )
Answered By - JumperBot_