the common practice to replace a fragment by another fragment is:
getActivity().getSupportFragmentManager()
.beginTransaction()
.setReorderingAllowed(true)
.replace(R.id.fragment_holder, ItemFragment.newInstance(bundle),"tag")
.addToBackStack(null)
.commit();
the documentation for commit() method says:
Schedules a commit of this transaction. The commit does not happen immediately; it will be scheduled as work on the main thread to be done the next time that thread is ready.
now imagine I call getActivity.getSupportFragmentManager.findFragmentByTag("tag"); right after the commit method mentioned above. since the commit does not happen immediately, is it possible that it returns null?