I have a Fragment
, let's call it... F1
containing a Fragment
F2
; which in turn contains a Fragment
F3
.
When I launch my application I receive this error:
IllegalStateException: Activity has been destroyed
which refers to this line of code:
getChildFragmentManager().beginTransaction().add(R.id.fragmentcontainer, fragment_profile_list.newInstance()).commit();
Where fragmentcontainer
is a FrameLayout
within my primary upper level Fragment
F1
. Where F2
is placed within F1
's fragmentcontainer
.
Any ideas on how to go about solving this; I tried doing a search and the other results said to hardcode a Fragment
field and allocate it immediately but that did not resolve the matter either.