summaryrefslogtreecommitdiff
path: root/core/java/android/widget/LinearLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/widget/LinearLayout.java')
-rw-r--r--core/java/android/widget/LinearLayout.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java
index f153ce53fbc7..9d14254bdbbd 100644
--- a/core/java/android/widget/LinearLayout.java
+++ b/core/java/android/widget/LinearLayout.java
@@ -185,6 +185,8 @@ public class LinearLayout extends ViewGroup {
private int mShowDividers;
private int mDividerPadding;
+ private int mLayoutDirection = View.LAYOUT_DIRECTION_UNDEFINED;
+
public LinearLayout(Context context) {
this(context, null);
}
@@ -1567,6 +1569,17 @@ public class LinearLayout extends ViewGroup {
}
}
+ @Override
+ public void onRtlPropertiesChanged(@ResolvedLayoutDir int layoutDirection) {
+ super.onRtlPropertiesChanged(layoutDirection);
+ if (layoutDirection != mLayoutDirection) {
+ mLayoutDirection = layoutDirection;
+ if (mOrientation == HORIZONTAL) {
+ requestLayout();
+ }
+ }
+ }
+
/**
* Position the children during a layout pass if the orientation of this
* LinearLayout is set to {@link #HORIZONTAL}.