In my PoC, I have some Activities, HomeActivity
, CreateActivity
, SearchActivity
, ResultsActivity
, ResultDetailsActivity
, and UpdateActivity
.
I have two main navigation paths: Create and Search.
Navigation for the Create path is as follows: HomeActivity
--> CreateActivity
-(on complete)-> HomeActivity
Navigation for Search is as follows: HomeActivity
--> SearchActivity
--> ResultsActivity
(ListActivity
) --> ResultDetailsActivity
--> UpdateActivity
-(on complete)-> ResultDetailsActivity
(with updated data).
Currently, navigation to a new Activity
is via startActivity(intent)
method. However, this is causing multiple instances of each Activity
to be opened.
I'm rather new to Android. Could someone please suggest how I could avoid this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…