Moving between actions on the stack

Suppose I have activity instances A1, B1, A2, B2, C1 of actions A, B, C on the stack. How can I go to activity instance B1 from C1?

Let's summarize that there will be an “n” number of actions between B1 and C1.

I do not want to create a new instance of B from C1.

+4
source share
2 answers

This is actually a very bad architecture for Android. If you create multiple instances in Activity, there is no way to specifically address them, for example: "Return to the first instance ActivityB." Android is not designed that way.

Activity. beter "" , , , , Activity.

startActivityForResult() Axctivity , .

. ( , , FLAG_ACTIVITY_REORDER_TO_FRONT, - ):

+3

Source: https://habr.com/ru/post/1652185/


All Articles