how to prevent growing activity stack in android -


i read somewhere each time call startactivity() transition new screen, creating new instance of activity. raised red flag me.

in search of way prevent issue, read using flag_activity_reorder_to_front. i'm little alarmed method not used in of tutorials i've seen opening new screen in app. think might missing something. mean wouldn't want make sure you're not creating duplicate activity? isn't kind of big deal , shouldn't tutorials address it?

i want make sure understanding, , dealing with, issue correctly, , using commonly practiced way transition between screens.

i understand in cases open screen, something, close using finish() , go back. if app has complex 4 level hierarchy , , user needs able jump around between screens?

i mean wouldn't want make sure you're not creating duplicate activity

most of time won't want have 2 instances of same activity suppose there situations might

isn't kind of big deal , shouldn't tutorials address it

it android developers need know , understand how use. imagine may not see lot of in tutorials because of them teach basics started. when developer new android, typically have enough learn framework. , show how few screens (which may need). expect learn more of details reading through docs , using websites such so

i understand in cases open screen, something, close using finish() , go back. if app has complex 4 level hierarchy , , user needs able jump around between screens?

yes, lot of times won't getting deep because deeper easier "lost" feeling. why using activities dialog theme when possible. gives feeling aren't leaving screen on. however, doesn't answer question. there many flags can used intents keep stack growing. 1 mentioned works , use intent.flag_activity_clear_top quite if need clear activities stack , 1 single activity. there can many different situations between apps, users, , developers how transition , work flow or navigation depends on (really, user) needs.

it seems on right track asking these questions. think give user best , natural experience , find right flags in intent docs situation

i hope cleared things little. if don't understand something, feel free ask


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -