Use the DialogFragment.show(FragmentManager manager, String tag)
version instead.
So in your case:
protected void showNewsItem(News news) {
DialogFragment newFragment = MyNewsFragment.newInstance();
newFragment.show(getFragmentManager(), "dialog");
}
Usually, the above idiom is sufficient for showing a DialogFragment
.
The show(FragmentTransaction transaction, String tag)
version is for "piggybacking" an existing FragmentTransaction
.