Estoy usando el paquete de soporte v4.No se puede encontrar el fragmento por la etiqueta
mFragmentManager = getSupportFragmentManager();
FragmentTransaction ft = mFragmentManager.beginTransaction();
ft.add(R.id.fragContainer1, new ModelListFragment(), FRAG_MODEL_LIST);
ft.add(R.id.fragContainer2, new TrimListFragment(), FRAG_TRIM_LIST);
ft.commit();
Fragment fragment = mFragmentManager.findFragmentByTag(
MainActivity.FRAG_MODEL_LIST);
Log.d("MY", "found fragment: " + (fragment != null));
Siempre devuelve "found fragment: false". Me falta algo realmente obvio aquí, ¿qué es?
Y si _realmente_ desea que se aplique la transacción, entonces use [executePendingTransactions] (http://developer.android.com/reference/android/app/FragmentManager.html#executePendingTransactions()) –