mercredi 2 avril 2014

Update Fragment in the tab activity


Vote count:

0




To do this, i've created an actitivy that extends a FragmentActivity and implements an ActionBar.TabListener.


What i need to do is, when the user choose the option to edit an item, the form opens inside the tab, updating the fragment of tab and not starting a new activiy. I tried to use a FragmentTransaction in the List activity fragment, but, it didn't work. The code i tried was the following (at the ListFragment)



FragmentTransaction transaction = getFragmentManager()
.beginTransaction();
transaction.replace(((ViewGroup) getView().getParent()).getId(),
newFragment);
transaction.addToBackStack(null);
transaction .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE); //
// Commit the transaction
transaction.commit();


Somebody can help me? Thanks What i need to do is, when the user choose the option to edit an item, the form opens inside the tab, updating the fragment of tab and not starting a new activiy. I tried to use a FragmentTransaction in the List activity fragment, but, it didn't work. The code i tried was the following (at the ListFragment)



asked 26 secs ago






Aucun commentaire:

Enregistrer un commentaire