android: Activity.startActivityForResult() or ActivityGroup?
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?
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.
精彩评论