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.

enter image description here

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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -