android - FragmentManager是一个什么样的存在?
阿神
阿神 2017-04-17 17:36:42
0
1
576

activity因设备旋转或清理内存而销毁前后FragmentManager都存在吗?为什么要获取的fragment都存在于队列中,这其中是一个什么样的过程?

阿神
阿神

闭关修行中......

reply all(1)
小葫芦

The first question: To be precise, it does not exist. The regenerated Activity after destruction will build a new FragmentManager instance, but the old Activity will save the Fragment instance that was retained in the FragmentManager before destruction through the onRetainNonConfigurationInstance() method, and then Restore these Fragment instances after the Activity is recreated

I don’t quite understand your second question, can you explain it in detail?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template