2

假设我有以下内容:

 __________________
|Activity_Parent   |
|        |         |
|        |         | 
|        |         |  
|Fragment_Container|  
|Fragment_Footer   |
|__________________|\
                     \
                      \________________________
                     |      Activity_Child     |
                     |            |            |
                     |            |            |
                     |            |            |
                     |Fragment_Child_Container |
                     |_________________________|

Activity_Parent 托管一个容器片段(具有几个不同的屏幕)和一个页脚片段,我希望在所有活动中保持不变,这样我就不会浪费时间重新创建它 - 它对于整个应用程序保持不变。

页脚片段当前是在 Activity_Parent 的 onCreate() 中创建的。

当我完成 Activity_Parent 并启动 Activity_Child (它还记得它的父级的 onCreate() )时,有什么办法让我不必重新创建页脚片段?

我希望我很清楚 - 我自己也很困惑。

4

0 回答 0