Skip to content Skip to sidebar Skip to footer

How To Call Fragment From Fragment?

I use the fragment, and i open another view in the same fragment it's open properly, But the problem is, I can't get that how get back to the first view. If i call fragment by the

Solution 1:

I use Fragment on android3.0(Tab app) in that i got this as worked.

FragmentduedateFrag=newDuedateFrag(true);
FragmentTransactionft= getFragmentManager().beginTransaction();
ft.replace(R.id.main_tasklistdetail_lay, duedateFrag);
ft.addToBackStack(null);
ft.commit();

Solution 2:

You can use setTargetFragment. An example is available here

Post a Comment for "How To Call Fragment From Fragment?"