This is my code:
protected void showNewsItem(News news) {
FragmentManager fm = getFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
DialogFragment newFragment = MyNewsFragment.newInstance();
newFragment.show(ft, "dialog");
}
and the error This FragmentManager should be recycled after use with #recylce()
appears on the beginTransaction
line.
I've tried adding fm.recycle();
like the error suggests, but that gives me an error that recycle
is undefined.