Well i have 2 activities, say A and B, user zipping between them like crazy A then going to B then A etc, now i dont want the normal behavior of zipping back to home through all those "layers" of A and B.
I want that if the user is in A it will go back to Home, if he is in B he will go back to A, and i want to do that as traditional and system friendly as possible - which means that i dont want workarounds that would fill my Activity stack nor do i want to start activities on new tasks.
i have tried using android:clearTaskOnLaunch="true" on activity A, and as it is documented it seems like the best thing to do, but it doesnt provide the documented behavior - it is behaving the same as it did without it...
what do you suggest?
finish()
in B so that it self terminates after it starts A.finish()
is perfectly acceptable if theActivity
starting anotherActivity
will no longer be needed and by calling it, theActivity
will go through all of its life-cycle stages. Basically,onPause()
,onStop()
andonDestroy()
will be called and theActivity
will be cleaned up normally.