I have a fragment I am trying to add into a view.
FragmentManager fragMgr=getSupportFragmentManager();
feed_parser_activity content = (feed_parser_activity)f
In my case. I have an Activity
with serveral Fragment
s
some time I need to recreate Fragment
s when
I clear all Fragment
s and set all to null
in activity
but Fragment already create itself, while it host activty
is bean set null, so before call Fragment view
check it null
for example
Activity{
fragment
recreate{
fragment = null then new instance
}
}
Fragment{
if((activity).fragment != null) {
findViewById()
}
}