am 6b4d0f21: am 42689769: Merge "Document behavior and usage of ViewGroup.bringChildToFront()" into jb-mr2-dev
* commit '6b4d0f21109209f1390125f301f20aa32e83b91a':
Document behavior and usage of ViewGroup.bringChildToFront()
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index d658aac..02ce2be 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -8711,7 +8711,12 @@
/**
* Change the view's z order in the tree, so it's on top of other sibling
- * views
+ * views. This ordering change may affect layout, if the parent container
+ * uses an order-dependent layout scheme (e.g., LinearLayout). This
+ * method should be followed by calls to {@link #requestLayout()} and
+ * {@link View#invalidate()} on the parent.
+ *
+ * @see ViewGroup#bringChildToFront(View)
*/
public void bringToFront() {
if (mParent != null) {
diff --git a/core/java/android/view/ViewParent.java b/core/java/android/view/ViewParent.java
index 4b70bc0..d79aa7e 100644
--- a/core/java/android/view/ViewParent.java
+++ b/core/java/android/view/ViewParent.java
@@ -146,9 +146,13 @@
public View focusSearch(View v, int direction);
/**
- * Change the z order of the child so it's on top of all other children
+ * Change the z order of the child so it's on top of all other children.
+ * This ordering change may affect layout, if this container
+ * uses an order-dependent layout scheme (e.g., LinearLayout). This
+ * method should be followed by calls to {@link #requestLayout()} and
+ * {@link View#invalidate()} on this parent.
*
- * @param child
+ * @param child The child to bring to the top of the z order
*/
public void bringChildToFront(View child);