diff options
| author | 2016-08-09 20:55:34 +0000 | |
|---|---|---|
| committer | 2016-08-09 20:55:35 +0000 | |
| commit | 5ca44906c66046135e47c7cc46751f2f35d10a7c (patch) | |
| tree | dafcf9cdd9cdedeab4e4ae4ef55a482d2f073792 | |
| parent | a70c722c779860a653d6f5f3f7c81d5d8dacf67f (diff) | |
| parent | a8e1c75bf606f262feb6493d17726c4722ca5208 (diff) | |
Merge "Docs: Fixed the link that loads Fragments guide" into nyc-docs
| -rw-r--r-- | core/java/android/app/FragmentTransaction.java | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/core/java/android/app/FragmentTransaction.java b/core/java/android/app/FragmentTransaction.java index e435580d55fe..633e85b78118 100644 --- a/core/java/android/app/FragmentTransaction.java +++ b/core/java/android/app/FragmentTransaction.java @@ -17,7 +17,8 @@ import java.lang.annotation.RetentionPolicy; * <div class="special reference"> * <h3>Developer Guides</h3> * <p>For more information about using fragments, read the - * <a href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a> developer guide.</p> + * <a href="{@docRoot}guide/components/fragments.html">Fragments</a> developer + * guide.</p> * </div> */ public abstract class FragmentTransaction { @@ -25,17 +26,17 @@ public abstract class FragmentTransaction { * Calls {@link #add(int, Fragment, String)} with a 0 containerViewId. */ public abstract FragmentTransaction add(Fragment fragment, String tag); - + /** * Calls {@link #add(int, Fragment, String)} with a null tag. */ public abstract FragmentTransaction add(@IdRes int containerViewId, Fragment fragment); - + /** * Add a fragment to the activity state. This fragment may optionally * also have its view (if {@link Fragment#onCreateView Fragment.onCreateView} * returns non-null) inserted into a container view of the activity. - * + * * @param containerViewId Optional identifier of the container this fragment is * to be placed in. If 0, it will not be placed in a container. * @param fragment The fragment to be added. This fragment must not already @@ -43,64 +44,64 @@ public abstract class FragmentTransaction { * @param tag Optional tag name for the fragment, to later retrieve the * fragment with {@link FragmentManager#findFragmentByTag(String) * FragmentManager.findFragmentByTag(String)}. - * + * * @return Returns the same FragmentTransaction instance. */ public abstract FragmentTransaction add(@IdRes int containerViewId, Fragment fragment, String tag); - + /** * Calls {@link #replace(int, Fragment, String)} with a null tag. */ public abstract FragmentTransaction replace(@IdRes int containerViewId, Fragment fragment); - + /** * Replace an existing fragment that was added to a container. This is * essentially the same as calling {@link #remove(Fragment)} for all * currently added fragments that were added with the same containerViewId * and then {@link #add(int, Fragment, String)} with the same arguments * given here. - * + * * @param containerViewId Identifier of the container whose fragment(s) are * to be replaced. * @param fragment The new fragment to place in the container. * @param tag Optional tag name for the fragment, to later retrieve the * fragment with {@link FragmentManager#findFragmentByTag(String) * FragmentManager.findFragmentByTag(String)}. - * + * * @return Returns the same FragmentTransaction instance. */ public abstract FragmentTransaction replace(@IdRes int containerViewId, Fragment fragment, String tag); - + /** * Remove an existing fragment. If it was added to a container, its view * is also removed from that container. - * + * * @param fragment The fragment to be removed. - * + * * @return Returns the same FragmentTransaction instance. */ public abstract FragmentTransaction remove(Fragment fragment); - + /** * Hides an existing fragment. This is only relevant for fragments whose * views have been added to a container, as this will cause the view to * be hidden. - * + * * @param fragment The fragment to be hidden. - * + * * @return Returns the same FragmentTransaction instance. */ public abstract FragmentTransaction hide(Fragment fragment); - + /** * Shows a previously hidden fragment. This is only relevant for fragments whose * views have been added to a container, as this will cause the view to * be shown. - * + * * @param fragment The fragment to be shown. - * + * * @return Returns the same FragmentTransaction instance. */ public abstract FragmentTransaction show(Fragment fragment); @@ -135,17 +136,17 @@ public abstract class FragmentTransaction { * <code>false</code> otherwise. */ public abstract boolean isEmpty(); - + /** * Bit mask that is set for all enter transitions. */ public static final int TRANSIT_ENTER_MASK = 0x1000; - + /** * Bit mask that is set for all exit transitions. */ public static final int TRANSIT_EXIT_MASK = 0x2000; - + /** Not set up for a transition. */ public static final int TRANSIT_UNSET = -1; /** No animation for transition. */ @@ -202,7 +203,7 @@ public abstract class FragmentTransaction { * animations. */ public abstract FragmentTransaction setTransitionStyle(@StyleRes int styleRes); - + /** * Add this transaction to the back stack. This means that the transaction * will be remembered after it is committed, and will reverse its operation @@ -269,7 +270,7 @@ public abstract class FragmentTransaction { * because the state after the commit can be lost if the activity needs to * be restored from its state. See {@link #commitAllowingStateLoss()} for * situations where it may be okay to lose the commit.</p> - * + * * @return Returns the identifier of this transaction's back stack entry, * if {@link #addToBackStack(String)} had been called. Otherwise, returns * a negative number. |