in some part of my application there is a structure of activities like this:
Activity A
is my home activity where I come back after each process or flow.
Activity B
is a simple confirmation activity.
Activity C
is another confirmation activity.
Activity D
does some process and finally it gets back the result to my home activity (Activity A
).
Requirements:
Activity B
and C
:
- must be there and cannot be merged in one.
- when it is clicked on the cancel button it calls
finish()
and does nothing.
- when it is clicked on the OK button it follows the flow and the current activity calls
finish()
Question:
I was thinking about using startActivityForResult()
but I have never used it to pass a result through multiple activities..
I also was thinking to pass a handler
(created in Activity A
) which calls some method on Activity A
and is executed on Activity D
...
How could I implement it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…