私はこのようFragment
に私のものを追加していActivity
ます:
getSupportFragmentManager()
.beginTransaction()
.add(R.id.frame_container, fragment)
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
.addToBackStack(fragment.getClass().getName())
.commit();
Fragment
しかし、それを使用してを見つけたいときは、FragmentManager
null を返します。
Fragment oldFragment = (Fragment) getSupportFragmentManager().findFragmentByTag(fragment.getClass().getName());