android intent - How to back stack activities without recreating them -
i new android. want understand activity stack.
i have 3 activities in app a(main)->b->c. want navigate a->b->c , c->b->a without restarting them, or changing states (as button in emulator does).
also, when press home button, want app go thebackground , when again launch app clicking icon, last activity should resumed in same state without restarting. mean this: a->b->c->(home button pressed, app went background)->launch app again clicking icon in emulator->c.
plzz me codes coz can't catch theory without demo :)
what describing default behavior in android.
to handle home button don't have code anything. if in activity c , press home button , later come back, still have activity c on top of stack.
if want navigate a->b->c start app activity a, later call startactivity() activity b, , later startactivity() activity c. if in activity c , want go b, call finish() on activity c.
Comments
Post a Comment