Android FragmentActivity finish close twice -


i have fragmentactivity , add fragment below,

    fragmenttransaction ft = fm.begintransaction();     ft.add(r.id.main_fragment_container, mfragment, mtag);     ft.commit(); 

but when call activity finish(), activity close normal, far good, after fragment show again , close. it's fast it's hard see on device (nexus 4). in galaxy s3, it's obvious see flash , disappear. have same problem?

a fragment should attached fragmentactivity holds it, try calling

fm.begintransaction().remove(mfragment).commit(); 

in onstop() method of fragmentactivity way can force fragment die before activity gone.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -