Sto usando jfeinstien10's SlidingMenu
. Il menu che si apre è un Fragment
. Quando l'utente fa clic su una voce di menu, si fa qualcosa di simile:FragmentTransaction inside a Fragment
FragmentTransaction t = getActivity().getSupportFragmentManager().beginTransaction();
SherlockListFragment mFrag = new ItemsFragment();
t.replace(R.id.main_frag, mFrag);
t.commit();
Tuttavia, ho sentito che non è buona norma controllare un Fragment
da un altro Fragment
. In una situazione come questa, è un metodo accettabile? O dovrei usare un metodo di callback per il genitore FragmentActivity
.
Se un metodo di richiamata è il modo corretto, posso vedere un esempio di come funziona?