diff --git a/core/java/android/widget/RelativeLayout.java b/core/java/android/widget/RelativeLayout.java index 44cf9a41c40ca..00bc21e3784eb 100644 --- a/core/java/android/widget/RelativeLayout.java +++ b/core/java/android/widget/RelativeLayout.java @@ -343,7 +343,7 @@ public class RelativeLayout extends ViewGroup { ignore = findViewById(mIgnoreGravity); } - View[] views = mSortedVerticalChildren; + View[] views = mSortedHorizontalChildren; int count = views.length; for (int i = 0; i < count; i++) { View child = views[i]; @@ -356,7 +356,7 @@ public class RelativeLayout extends ViewGroup { } } - views = mSortedHorizontalChildren; + views = mSortedVerticalChildren; count = views.length; for (int i = 0; i < count; i++) { View child = views[i];