Docs: Fixed the link that loads Fragments guide am: a8e1c75bf6 am: dabee01e9b

am: 3547fd0642

Change-Id: I325c16b92f193be2ff701da64e3896979441d6e7
This commit is contained in:
Hemal Patel
2016-08-09 21:19:50 +00:00
committed by android-build-merger

View File

@@ -17,7 +17,8 @@ import java.lang.annotation.RetentionPolicy;
* <div class="special reference"> * <div class="special reference">
* <h3>Developer Guides</h3> * <h3>Developer Guides</h3>
* <p>For more information about using fragments, read the * <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> * </div>
*/ */
public abstract class FragmentTransaction { public abstract class FragmentTransaction {
@@ -25,17 +26,17 @@ public abstract class FragmentTransaction {
* Calls {@link #add(int, Fragment, String)} with a 0 containerViewId. * Calls {@link #add(int, Fragment, String)} with a 0 containerViewId.
*/ */
public abstract FragmentTransaction add(Fragment fragment, String tag); public abstract FragmentTransaction add(Fragment fragment, String tag);
/** /**
* Calls {@link #add(int, Fragment, String)} with a null tag. * Calls {@link #add(int, Fragment, String)} with a null tag.
*/ */
public abstract FragmentTransaction add(@IdRes int containerViewId, Fragment fragment); public abstract FragmentTransaction add(@IdRes int containerViewId, Fragment fragment);
/** /**
* Add a fragment to the activity state. This fragment may optionally * Add a fragment to the activity state. This fragment may optionally
* also have its view (if {@link Fragment#onCreateView Fragment.onCreateView} * also have its view (if {@link Fragment#onCreateView Fragment.onCreateView}
* returns non-null) inserted into a container view of the activity. * returns non-null) inserted into a container view of the activity.
* *
* @param containerViewId Optional identifier of the container this fragment is * @param containerViewId Optional identifier of the container this fragment is
* to be placed in. If 0, it will not be placed in a container. * 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 * @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 * @param tag Optional tag name for the fragment, to later retrieve the
* fragment with {@link FragmentManager#findFragmentByTag(String) * fragment with {@link FragmentManager#findFragmentByTag(String)
* FragmentManager.findFragmentByTag(String)}. * FragmentManager.findFragmentByTag(String)}.
* *
* @return Returns the same FragmentTransaction instance. * @return Returns the same FragmentTransaction instance.
*/ */
public abstract FragmentTransaction add(@IdRes int containerViewId, Fragment fragment, public abstract FragmentTransaction add(@IdRes int containerViewId, Fragment fragment,
String tag); String tag);
/** /**
* Calls {@link #replace(int, Fragment, String)} with a null tag. * Calls {@link #replace(int, Fragment, String)} with a null tag.
*/ */
public abstract FragmentTransaction replace(@IdRes int containerViewId, Fragment fragment); public abstract FragmentTransaction replace(@IdRes int containerViewId, Fragment fragment);
/** /**
* Replace an existing fragment that was added to a container. This is * Replace an existing fragment that was added to a container. This is
* essentially the same as calling {@link #remove(Fragment)} for all * essentially the same as calling {@link #remove(Fragment)} for all
* currently added fragments that were added with the same containerViewId * currently added fragments that were added with the same containerViewId
* and then {@link #add(int, Fragment, String)} with the same arguments * and then {@link #add(int, Fragment, String)} with the same arguments
* given here. * given here.
* *
* @param containerViewId Identifier of the container whose fragment(s) are * @param containerViewId Identifier of the container whose fragment(s) are
* to be replaced. * to be replaced.
* @param fragment The new fragment to place in the container. * @param fragment The new fragment to place in the container.
* @param tag Optional tag name for the fragment, to later retrieve the * @param tag Optional tag name for the fragment, to later retrieve the
* fragment with {@link FragmentManager#findFragmentByTag(String) * fragment with {@link FragmentManager#findFragmentByTag(String)
* FragmentManager.findFragmentByTag(String)}. * FragmentManager.findFragmentByTag(String)}.
* *
* @return Returns the same FragmentTransaction instance. * @return Returns the same FragmentTransaction instance.
*/ */
public abstract FragmentTransaction replace(@IdRes int containerViewId, Fragment fragment, public abstract FragmentTransaction replace(@IdRes int containerViewId, Fragment fragment,
String tag); String tag);
/** /**
* Remove an existing fragment. If it was added to a container, its view * Remove an existing fragment. If it was added to a container, its view
* is also removed from that container. * is also removed from that container.
* *
* @param fragment The fragment to be removed. * @param fragment The fragment to be removed.
* *
* @return Returns the same FragmentTransaction instance. * @return Returns the same FragmentTransaction instance.
*/ */
public abstract FragmentTransaction remove(Fragment fragment); public abstract FragmentTransaction remove(Fragment fragment);
/** /**
* Hides an existing fragment. This is only relevant for fragments whose * 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 * views have been added to a container, as this will cause the view to
* be hidden. * be hidden.
* *
* @param fragment The fragment to be hidden. * @param fragment The fragment to be hidden.
* *
* @return Returns the same FragmentTransaction instance. * @return Returns the same FragmentTransaction instance.
*/ */
public abstract FragmentTransaction hide(Fragment fragment); public abstract FragmentTransaction hide(Fragment fragment);
/** /**
* Shows a previously hidden fragment. This is only relevant for fragments whose * 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 * views have been added to a container, as this will cause the view to
* be shown. * be shown.
* *
* @param fragment The fragment to be shown. * @param fragment The fragment to be shown.
* *
* @return Returns the same FragmentTransaction instance. * @return Returns the same FragmentTransaction instance.
*/ */
public abstract FragmentTransaction show(Fragment fragment); public abstract FragmentTransaction show(Fragment fragment);
@@ -135,17 +136,17 @@ public abstract class FragmentTransaction {
* <code>false</code> otherwise. * <code>false</code> otherwise.
*/ */
public abstract boolean isEmpty(); public abstract boolean isEmpty();
/** /**
* Bit mask that is set for all enter transitions. * Bit mask that is set for all enter transitions.
*/ */
public static final int TRANSIT_ENTER_MASK = 0x1000; public static final int TRANSIT_ENTER_MASK = 0x1000;
/** /**
* Bit mask that is set for all exit transitions. * Bit mask that is set for all exit transitions.
*/ */
public static final int TRANSIT_EXIT_MASK = 0x2000; public static final int TRANSIT_EXIT_MASK = 0x2000;
/** Not set up for a transition. */ /** Not set up for a transition. */
public static final int TRANSIT_UNSET = -1; public static final int TRANSIT_UNSET = -1;
/** No animation for transition. */ /** No animation for transition. */
@@ -202,7 +203,7 @@ public abstract class FragmentTransaction {
* animations. * animations.
*/ */
public abstract FragmentTransaction setTransitionStyle(@StyleRes int styleRes); public abstract FragmentTransaction setTransitionStyle(@StyleRes int styleRes);
/** /**
* Add this transaction to the back stack. This means that the transaction * Add this transaction to the back stack. This means that the transaction
* will be remembered after it is committed, and will reverse its operation * 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 * because the state after the commit can be lost if the activity needs to
* be restored from its state. See {@link #commitAllowingStateLoss()} for * be restored from its state. See {@link #commitAllowingStateLoss()} for
* situations where it may be okay to lose the commit.</p> * situations where it may be okay to lose the commit.</p>
* *
* @return Returns the identifier of this transaction's back stack entry, * @return Returns the identifier of this transaction's back stack entry,
* if {@link #addToBackStack(String)} had been called. Otherwise, returns * if {@link #addToBackStack(String)} had been called. Otherwise, returns
* a negative number. * a negative number.