我正在寻找我的问题的答案
为什么群组活动已被弃用?
我没有找到任何正确答案。我的第二个问题是
为什么我们必须使用 Fragment 而不是群组活动?
我需要详细回答这些问题。
答案 0 :(得分:2)
您可以通过阅读The Android 3.0 Fragments API博客获得详细答案。其中一个相关点是:
Embedded Activities via ActivityGroup were a nice idea, but have always been difficult to deal with since Activity is designed to be an independent self-contained component instead of closely interacting with other activities. The Fragment API is a much better solution for this, and should be considered as a replacement for embedded activities.
您还可以查看Is it advised to build all apps using fragments?问题。希望它有所帮助。