Wednesday, 15 August 2012

android - onResume() of fragment gets called before onDestroy() of activity when coming back from activity to fragment -



android - onResume() of fragment gets called before onDestroy() of activity when coming back from activity to fragment -

i have issue while calling activity fragment. calling activity fragment activity opens new window in device using next code.

intent intent = new intent(context, newactivity.class); startactivity(intent);

now when press button newactivity, previous fragment gets opened. working fine. need perform tasks in ondestroy() of newactivity before onresume of fragment called. here onresume() of fragment gets called first before ondestroy() activity gets called.

can tell why happens?

android android-activity fragment

No comments:

Post a Comment