开发者

android: Activity.startActivityForResult() or ActivityGroup?

开发者 https://www.devze.com 2023-01-29 02:11 出处:网络
I have the following situation: activity A -> resultA activity B -> resultB activity C -> resultC and I need all the results (A, B & C) to build the final out put?

I have the following situation:

  1. activity A -> resultA
  2. activity B -> resultB
  3. activity C -> resultC

and I need all the results (A, B & C) to build the final out put?

What's the better way:

AA extends Activity  {

startActivityForResult(A);
startActivityForResult(A);
startActivityForR开发者_StackOverflow社区esult(A);

}

or to make AA subtype of ActivityGroup?

Activities A, B and C do not require to be visible (foreground) at the same time.

Thank you!


IMHO, none of the above.

Popping out of one activity into another briefly via startActivityForResult() is fine...once. It gets cumbersome for users and developers alike when there are several.

Consider recasting your UI as a wizard, perhaps driven by a ViewFlipper, so you can keep all of this in a single activity. It also provides the user with a recognized pattern for going back and forth within the chain of steps leading to them providing all of the information you need.

0

精彩评论

暂无评论...
验证码 换一张
取 消