android - Overlapping DialogFragment, recreated in wrong order when orientation changes -
i'm using 2 overlapped dialogfragment
(i know, maybe not design pattern), , have problem on orientation changes.
when orientation changes, external dialogfragment
(the smallest) go behind internal.
the simplest solution application can dismiss external dialogfragment, i'm not able it, since setretaininstance(false)
seems not working dialogfragment
.
the fragment added dinamically, calling:
dialogfragment fragment = createeventfragment.newinstance(0); fragment.show(getfragmentmanager(), createeventfragment.fragment_tag);
i solved problem, overrinig onsaveinstancestate
, in way:
@override public void onsaveinstancestate(bundle outstate) { if(outstate==null) super.onsaveinstancestate(outstate); }
now, after orentation changes, outmost dialogfragment
mainteined external, recreated in right order.
Comments
Post a Comment