• Home
  • Raw
  • Download

Lines Matching refs:transaction

71 fragment transaction, you can also add it to a back stack that's managed by the
72 activity—each back stack entry in the activity is a record of the fragment transaction that
73 occurred. The back stack allows the user to reverse a fragment transaction (navigate backwards),
411 commit to the activity is called a transaction and you can perform one using APIs in {@link
412 android.app.FragmentTransaction}. You can also save each transaction to a back stack managed by the
424 <p>Each transaction is a set of changes that you want to perform at the same time. You can set
425 up all the changes you want to perform for a given transaction using methods such as {@link
427 and {@link android.app.FragmentTransaction#replace replace()}. Then, to apply the transaction
433 android.app.FragmentTransaction#addToBackStack addToBackStack()}, in order to add the transaction
441 // Create new fragment and transaction
443 FragmentTransaction transaction = getFragmentManager().beginTransaction();
446 // and add the transaction to the back stack
447 transaction.replace(R.id.fragment_container, newFragment);
448 transaction.addToBackStack(null);
450 // Commit the transaction
451 transaction.commit();
456 android.app.FragmentTransaction#addToBackStack addToBackStack()}, the replace transaction is
457 saved to the back stack so the user can reverse the transaction and bring back the
460 <p>If you add multiple changes to the transaction (such as another {@link
465 back stack as a single transaction and the <em>Back</em> button will reverse them all together.</p>
476 addToBackStack()} when you perform a transaction that removes a fragment, then that fragment is
477 destroyed when the transaction is committed and the user cannot navigate back to it. Whereas, if you
482 <p class="note"><strong>Tip:</strong> For each fragment transaction, you can apply a transition
486 <p>Calling {@link android.app.FragmentTransaction#commit()} does not perform the transaction
491 usually not necessary unless the transaction is a dependency for jobs in other threads.</p>
493 <p class="caution"><strong>Caution:</strong> You can commit a transaction using {@link
696 android.app.FragmentTransaction#addToBackStack(String) addToBackStack()} during a transaction that