阅读背景:

Android通过方向更改销毁持有者活动后创建额外的片段

来源:互联网 

I have an acticity that has simple FrameLayout as its layout.I add a fragment with textview programatically.When I change orientation,Android destroys fragment and its holder activity as expected but in next recreation, Android creates an extra fragment.This is increasing incrementally.For example after 3rd orientation change, Android creates 4 new fragments and I have only one new Fragment() statement in my code.Anyways, I prepared a minimum length code that reproduces this behavior.I have an acticity that has simple FrameLayout




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: