diff options
-rw-r--r-- | api/current.txt | 4 | ||||
-rw-r--r-- | core/java/android/view/Gravity.java | 14 | ||||
-rw-r--r-- | core/java/android/view/View.java | 94 | ||||
-rw-r--r-- | core/java/android/widget/LinearLayout.java | 4 | ||||
-rwxr-xr-x | core/res/res/values/attrs.xml | 14 | ||||
-rw-r--r-- | core/res/res/values/public.xml | 3 | ||||
-rw-r--r-- | tests/BiDiTests/res/layout/frame_layout_ltr.xml | 10 | ||||
-rw-r--r-- | tests/BiDiTests/res/layout/frame_layout_rtl.xml | 10 | ||||
-rw-r--r-- | tests/BiDiTests/res/layout/linear_layout_ltr.xml | 14 | ||||
-rw-r--r-- | tests/BiDiTests/res/layout/linear_layout_rtl.xml | 14 | ||||
-rw-r--r-- | tests/BiDiTests/res/layout/relative_layout_ltr.xml | 10 | ||||
-rw-r--r-- | tests/BiDiTests/res/layout/relative_layout_ltr_2.xml | 8 | ||||
-rw-r--r-- | tests/BiDiTests/res/layout/relative_layout_rtl.xml | 10 | ||||
-rw-r--r-- | tests/BiDiTests/res/layout/relative_layout_rtl_2.xml | 8 | ||||
-rw-r--r-- | tests/BiDiTests/res/layout/table_layout_ltr.xml | 8 | ||||
-rw-r--r-- | tests/BiDiTests/res/layout/table_layout_rtl.xml | 8 |
16 files changed, 118 insertions, 115 deletions
diff --git a/api/current.txt b/api/current.txt index 1f277745a411..073bf9156f7a 100644 --- a/api/current.txt +++ b/api/current.txt @@ -486,7 +486,6 @@ package android { field public static final int hint = 16843088; // 0x1010150 field public static final int homeAsUpIndicator = 16843531; // 0x101030b field public static final int homeLayout = 16843549; // 0x101031d - field public static final int horizontalDirection = 16843631; // 0x101036f field public static final int horizontalDivider = 16843053; // 0x101012d field public static final int horizontalGap = 16843327; // 0x101023f field public static final int horizontalScrollViewStyle = 16843603; // 0x1010353 @@ -571,6 +570,7 @@ package android { field public static final int layerType = 16843604; // 0x1010354 field public static final int layout = 16842994; // 0x10100f2 field public static final int layoutAnimation = 16842988; // 0x10100ec + field public static final int layoutDirection = 16843631; // 0x101036f field public static final int layout_above = 16843140; // 0x1010184 field public static final int layout_alignBaseline = 16843142; // 0x1010186 field public static final int layout_alignBottom = 16843146; // 0x101018a @@ -20458,8 +20458,8 @@ package android.view { field public static final int HORIZONTAL_GRAVITY_MASK = 7; // 0x7 field public static final int LEFT = 3; // 0x3 field public static final int NO_GRAVITY = 0; // 0x0 - field public static final int RELATIVE_HORIZONTAL_DIRECTION = 8388608; // 0x800000 field public static final int RELATIVE_HORIZONTAL_GRAVITY_MASK = 8388615; // 0x800007 + field public static final int RELATIVE_LAYOUT_DIRECTION = 8388608; // 0x800000 field public static final int RIGHT = 5; // 0x5 field public static final int START = 8388611; // 0x800003 field public static final int TOP = 48; // 0x30 diff --git a/core/java/android/view/Gravity.java b/core/java/android/view/Gravity.java index ba067956f6d5..69e64898e343 100644 --- a/core/java/android/view/Gravity.java +++ b/core/java/android/view/Gravity.java @@ -81,8 +81,10 @@ public class Gravity * horizontal axis. */ public static final int CLIP_HORIZONTAL = AXIS_CLIP<<AXIS_X_SHIFT; - /** Raw bit controlling whether the horizontal direction is relative (before/after) or not. */ - public static final int RELATIVE_HORIZONTAL_DIRECTION = 0x00800000; + /** Raw bit controlling whether the layout direction is relative or not (START/END instead of + * absolute LEFT/RIGHT). + */ + public static final int RELATIVE_LAYOUT_DIRECTION = 0x00800000; /** * Binary mask to get the absolute horizontal gravity of a gravity. @@ -110,10 +112,10 @@ public class Gravity public static final int DISPLAY_CLIP_HORIZONTAL = 0x01000000; /** Push object to x-axis position at the start of its container, not changing its size. */ - public static final int START = RELATIVE_HORIZONTAL_DIRECTION | LEFT; + public static final int START = RELATIVE_LAYOUT_DIRECTION | LEFT; /** Push object to x-axis position at the end of its container, not changing its size. */ - public static final int END = RELATIVE_HORIZONTAL_DIRECTION | RIGHT; + public static final int END = RELATIVE_LAYOUT_DIRECTION | RIGHT; /** * Binary mask for the horizontal gravity and script specific direction bit. @@ -352,7 +354,7 @@ public class Gravity public static int getAbsoluteGravity(int gravity, boolean isRtl) { int result = gravity; // If layout is script specific and gravity is horizontal relative (START or END) - if ((result & RELATIVE_HORIZONTAL_DIRECTION) > 0) { + if ((result & RELATIVE_LAYOUT_DIRECTION) > 0) { if ((result & Gravity.START) == Gravity.START) { // Remove the START bit result &= ~START; @@ -376,7 +378,7 @@ public class Gravity } // Don't need the script specific bit any more, so remove it as we are converting to // absolute values (LEFT or RIGHT) - result &= ~RELATIVE_HORIZONTAL_DIRECTION; + result &= ~RELATIVE_LAYOUT_DIRECTION; } return result; } diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 51eb13b6a7ea..70218acaa938 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -951,51 +951,51 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit /** * Horizontal direction of this view is from Left to Right. - * Use with {@link #setHorizontalDirection}. + * Use with {@link #setLayoutDirection}. * {@hide} */ - public static final int HORIZONTAL_DIRECTION_LTR = 0x00000000; + public static final int LAYOUT_DIRECTION_LTR = 0x00000000; /** * Horizontal direction of this view is from Right to Left. - * Use with {@link #setHorizontalDirection}. + * Use with {@link #setLayoutDirection}. * {@hide} */ - public static final int HORIZONTAL_DIRECTION_RTL = 0x40000000; + public static final int LAYOUT_DIRECTION_RTL = 0x40000000; /** * Horizontal direction of this view is inherited from its parent. - * Use with {@link #setHorizontalDirection}. + * Use with {@link #setLayoutDirection}. * {@hide} */ - public static final int HORIZONTAL_DIRECTION_INHERIT = 0x80000000; + public static final int LAYOUT_DIRECTION_INHERIT = 0x80000000; /** * Horizontal direction of this view is from deduced from the default language - * script for the locale. Use with {@link #setHorizontalDirection}. + * script for the locale. Use with {@link #setLayoutDirection}. * {@hide} */ - public static final int HORIZONTAL_DIRECTION_LOCALE = 0xC0000000; + public static final int LAYOUT_DIRECTION_LOCALE = 0xC0000000; /** * Mask for use with setFlags indicating bits used for horizontalDirection. * {@hide} */ - static final int HORIZONTAL_DIRECTION_MASK = 0xC0000000; + static final int LAYOUT_DIRECTION_MASK = 0xC0000000; /* * Array of horizontal direction flags for mapping attribute "horizontalDirection" to correct * flag value. * {@hide} */ - private static final int[] HORIZONTAL_DIRECTION_FLAGS = { HORIZONTAL_DIRECTION_LTR, - HORIZONTAL_DIRECTION_RTL, HORIZONTAL_DIRECTION_INHERIT, HORIZONTAL_DIRECTION_LOCALE}; + private static final int[] LAYOUT_DIRECTION_FLAGS = {LAYOUT_DIRECTION_LTR, + LAYOUT_DIRECTION_RTL, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE}; /** * Default horizontalDirection. * {@hide} */ - private static final int HORIZONTAL_DIRECTION_DEFAULT = HORIZONTAL_DIRECTION_INHERIT; + private static final int LAYOUT_DIRECTION_DEFAULT = LAYOUT_DIRECTION_INHERIT; /** * View flag indicating whether {@link #addFocusables(ArrayList, int, int)} @@ -2464,7 +2464,7 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit public View(Context context) { mContext = context; mResources = context != null ? context.getResources() : null; - mViewFlags = SOUND_EFFECTS_ENABLED | HAPTIC_FEEDBACK_ENABLED | HORIZONTAL_DIRECTION_INHERIT; + mViewFlags = SOUND_EFFECTS_ENABLED | HAPTIC_FEEDBACK_ENABLED | LAYOUT_DIRECTION_INHERIT; mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); setOverScrollMode(OVER_SCROLL_IF_CONTENT_SCROLLS); } @@ -2662,18 +2662,18 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit viewFlagMasks |= VISIBILITY_MASK; } break; - case com.android.internal.R.styleable.View_horizontalDirection: + case com.android.internal.R.styleable.View_layoutDirection: // Clear any HORIZONTAL_DIRECTION flag already set - viewFlagValues &= ~HORIZONTAL_DIRECTION_MASK; + viewFlagValues &= ~LAYOUT_DIRECTION_MASK; // Set the HORIZONTAL_DIRECTION flags depending on the value of the attribute - final int horizontalDirection = a.getInt(attr, -1); - if (horizontalDirection != -1) { - viewFlagValues |= HORIZONTAL_DIRECTION_FLAGS[horizontalDirection]; + final int layoutDirection = a.getInt(attr, -1); + if (layoutDirection != -1) { + viewFlagValues |= LAYOUT_DIRECTION_FLAGS[layoutDirection]; } else { - // Set to default (HORIZONTAL_DIRECTION_INHERIT) - viewFlagValues |= HORIZONTAL_DIRECTION_DEFAULT; + // Set to default (LAYOUT_DIRECTION_INHERIT) + viewFlagValues |= LAYOUT_DIRECTION_DEFAULT; } - viewFlagMasks |= HORIZONTAL_DIRECTION_MASK; + viewFlagMasks |= LAYOUT_DIRECTION_MASK; break; case com.android.internal.R.styleable.View_drawingCacheQuality: final int cacheQuality = a.getInt(attr, 0); @@ -4256,38 +4256,38 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit } /** - * Returns the horizontal direction for this view. + * Returns the layout direction for this view. * - * @return One of {@link #HORIZONTAL_DIRECTION_LTR}, - * {@link #HORIZONTAL_DIRECTION_RTL}, - * {@link #HORIZONTAL_DIRECTION_INHERIT} or - * {@link #HORIZONTAL_DIRECTION_LOCALE}. - * @attr ref android.R.styleable#View_horizontalDirection + * @return One of {@link #LAYOUT_DIRECTION_LTR}, + * {@link #LAYOUT_DIRECTION_RTL}, + * {@link #LAYOUT_DIRECTION_INHERIT} or + * {@link #LAYOUT_DIRECTION_LOCALE}. + * @attr ref android.R.styleable#View_layoutDirection * @hide */ @ViewDebug.ExportedProperty(category = "layout", mapping = { - @ViewDebug.IntToString(from = HORIZONTAL_DIRECTION_LTR, to = "LTR"), - @ViewDebug.IntToString(from = HORIZONTAL_DIRECTION_RTL, to = "RTL"), - @ViewDebug.IntToString(from = HORIZONTAL_DIRECTION_INHERIT, to = "INHERIT"), - @ViewDebug.IntToString(from = HORIZONTAL_DIRECTION_LOCALE, to = "LOCALE") + @ViewDebug.IntToString(from = LAYOUT_DIRECTION_LTR, to = "LTR"), + @ViewDebug.IntToString(from = LAYOUT_DIRECTION_RTL, to = "RTL"), + @ViewDebug.IntToString(from = LAYOUT_DIRECTION_INHERIT, to = "INHERIT"), + @ViewDebug.IntToString(from = LAYOUT_DIRECTION_LOCALE, to = "LOCALE") }) - public int getHorizontalDirection() { - return mViewFlags & HORIZONTAL_DIRECTION_MASK; + public int getLayoutDirection() { + return mViewFlags & LAYOUT_DIRECTION_MASK; } /** - * Set the horizontal direction for this view. + * Set the layout direction for this view. * - * @param horizontalDirection One of {@link #HORIZONTAL_DIRECTION_LTR}, - * {@link #HORIZONTAL_DIRECTION_RTL}, - * {@link #HORIZONTAL_DIRECTION_INHERIT} or - * {@link #HORIZONTAL_DIRECTION_LOCALE}. - * @attr ref android.R.styleable#View_horizontalDirection + * @param layoutDirection One of {@link #LAYOUT_DIRECTION_LTR}, + * {@link #LAYOUT_DIRECTION_RTL}, + * {@link #LAYOUT_DIRECTION_INHERIT} or + * {@link #LAYOUT_DIRECTION_LOCALE}. + * @attr ref android.R.styleable#View_layoutDirection * @hide */ @RemotableViewMethod - public void setHorizontalDirection(int horizontalDirection) { - setFlags(horizontalDirection, HORIZONTAL_DIRECTION_MASK); + public void setLayoutDirection(int layoutDirection) { + setFlags(layoutDirection, LAYOUT_DIRECTION_MASK); } /** @@ -6103,7 +6103,7 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit } } - if ((changed & HORIZONTAL_DIRECTION_MASK) != 0) { + if ((changed & LAYOUT_DIRECTION_MASK) != 0) { requestLayout(); } } @@ -8658,24 +8658,24 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit mPrivateFlags &= ~AWAKEN_SCROLL_BARS_ON_ATTACH; } jumpDrawablesToCurrentState(); - resolveHorizontalDirection(); + resolveLayoutDirection(); } /** * Resolving the layout direction. LTR is set initially. * We are supposing here that the parent directionality will be resolved before its children */ - private void resolveHorizontalDirection() { + private void resolveLayoutDirection() { mPrivateFlags2 &= ~RESOLVED_LAYOUT_RTL; - switch (getHorizontalDirection()) { - case HORIZONTAL_DIRECTION_INHERIT: + switch (getLayoutDirection()) { + case LAYOUT_DIRECTION_INHERIT: // If this is root view, no need to look at parent's layout dir. if (mParent != null && mParent instanceof ViewGroup && ((ViewGroup) mParent).isLayoutRtl()) { mPrivateFlags2 |= RESOLVED_LAYOUT_RTL; } break; - case HORIZONTAL_DIRECTION_RTL: + case LAYOUT_DIRECTION_RTL: mPrivateFlags2 |= RESOLVED_LAYOUT_RTL; break; } diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java index 38767351fdc2..0cdbc5b53f1d 100644 --- a/core/java/android/widget/LinearLayout.java +++ b/core/java/android/widget/LinearLayout.java @@ -132,8 +132,8 @@ public class LinearLayout extends ViewGroup { equals = Gravity.CENTER, name = "CENTER"), @ViewDebug.FlagToString(mask = Gravity.FILL, equals = Gravity.FILL, name = "FILL"), - @ViewDebug.FlagToString(mask = Gravity.RELATIVE_HORIZONTAL_DIRECTION, - equals = Gravity.RELATIVE_HORIZONTAL_DIRECTION, name = "RELATIVE") + @ViewDebug.FlagToString(mask = Gravity.RELATIVE_LAYOUT_DIRECTION, + equals = Gravity.RELATIVE_LAYOUT_DIRECTION, name = "RELATIVE") }) private int mGravity = Gravity.START | Gravity.TOP; diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 94a90636f7be..4a7c6909ba56 100755 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -1191,9 +1191,9 @@ edge, a right gravity will clip the left edge, and neither will clip both edges. --> <flag name="clip_horizontal" value="0x08" /> <!-- Push object to the beginning of its container, not changing its size. --> - <flag name="before" value="0x00800003" /> + <flag name="start" value="0x00800003" /> <!-- Push object to the end of its container, not changing its size. --> - <flag name="after" value="0x00800005" /> + <flag name="end" value="0x00800005" /> </attr> <!-- Standard orientation constant. --> @@ -1932,11 +1932,11 @@ </attr> <!-- Defines the direction of layout drawing. This typically is associated with writing - direction of the language script used. The possible values are Left-to-Right, - Right-to-Left, Locale and Inherit from parent view. If there is nothing to inherit, - Locale is used. Locale fallsback to 'en-US'. Left-to-Right is the direction used in - 'en-US'. The default for this attribute is 'inherit'. --> - <attr name="horizontalDirection"> + direction of the language script used. The possible values are "ltr" for Left-to-Right, + "rtl" for Right-to-Left, "locale" and "inherit" from parent view. If there is nothing + to inherit, "locale" is used. "locale" falls back to "en-US". "ltr" is the direction + used in "en-US". The default for this attribute is "inherit". --> + <attr name="layoutDirection"> <!-- Left-to-Right --> <enum name="ltr" value="0" /> <!-- Right-to-Left --> diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index 81f888de98c6..f2bd7cbf2a3a 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -1675,7 +1675,8 @@ <public type="attr" name="textEditSuggestionsBottomWindowLayout" /> <public type="attr" name="textEditSuggestionsTopWindowLayout" /> <public type="attr" name="textEditSuggestionItemLayout" /> - <public type="attr" name="horizontalDirection" /> + + <public type="attr" name="layoutDirection" /> <public type="attr" name="fullBackupAgent" /> <public type="attr" name="suggestionsEnabled" /> diff --git a/tests/BiDiTests/res/layout/frame_layout_ltr.xml b/tests/BiDiTests/res/layout/frame_layout_ltr.xml index bd324e3c0cad..61fd06e08532 100644 --- a/tests/BiDiTests/res/layout/frame_layout_ltr.xml +++ b/tests/BiDiTests/res/layout/frame_layout_ltr.xml @@ -18,7 +18,7 @@ android:id="@+id/frame_layout_ltr" android:layout_width="match_parent" android:layout_height="match_parent" - android:horizontalDirection="ltr" + android:layoutDirection="ltr" android:background="#FF000000"> <FrameLayout @@ -52,28 +52,28 @@ <FrameLayout android:layout_width="100dp" android:layout_height="100dp" - android:layout_gravity="top|before" + android:layout_gravity="top|start" android:background="#FFFFFFFF"> </FrameLayout> <FrameLayout android:layout_width="100dp" android:layout_height="100dp" - android:layout_gravity="top|after" + android:layout_gravity="top|end" android:background="#FFFFFF00"> </FrameLayout> <FrameLayout android:layout_width="100dp" android:layout_height="100dp" - android:layout_gravity="bottom|before" + android:layout_gravity="bottom|start" android:background="#FFFFFFFF"> </FrameLayout> <FrameLayout android:layout_width="100dp" android:layout_height="100dp" - android:layout_gravity="bottom|after" + android:layout_gravity="bottom|end" android:background="#FFFFFF00"> </FrameLayout> diff --git a/tests/BiDiTests/res/layout/frame_layout_rtl.xml b/tests/BiDiTests/res/layout/frame_layout_rtl.xml index 814f5e137b3f..598b41a233a2 100644 --- a/tests/BiDiTests/res/layout/frame_layout_rtl.xml +++ b/tests/BiDiTests/res/layout/frame_layout_rtl.xml @@ -18,7 +18,7 @@ android:id="@+id/frame_layout_ltr" android:layout_width="match_parent" android:layout_height="match_parent" - android:horizontalDirection="rtl" + android:layoutDirection="rtl" android:background="#FF000000"> <FrameLayout @@ -52,28 +52,28 @@ <FrameLayout android:layout_width="100dp" android:layout_height="100dp" - android:layout_gravity="top|before" + android:layout_gravity="top|start" android:background="#FFFFFFFF"> </FrameLayout> <FrameLayout android:layout_width="100dp" android:layout_height="100dp" - android:layout_gravity="top|after" + android:layout_gravity="top|end" android:background="#FFFFFF00"> </FrameLayout> <FrameLayout android:layout_width="100dp" android:layout_height="100dp" - android:layout_gravity="bottom|before" + android:layout_gravity="bottom|start" android:background="#FFFFFFFF"> </FrameLayout> <FrameLayout android:layout_width="100dp" android:layout_height="100dp" - android:layout_gravity="bottom|after" + android:layout_gravity="bottom|end" android:background="#FFFFFF00"> </FrameLayout> diff --git a/tests/BiDiTests/res/layout/linear_layout_ltr.xml b/tests/BiDiTests/res/layout/linear_layout_ltr.xml index c5a8d47d6e62..d4386f2d0102 100644 --- a/tests/BiDiTests/res/layout/linear_layout_ltr.xml +++ b/tests/BiDiTests/res/layout/linear_layout_ltr.xml @@ -19,7 +19,7 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - android:horizontalDirection="ltr"> + android:layoutDirection="ltr"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" @@ -51,7 +51,7 @@ android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" - android:horizontalDirection="inherit"> + android:layoutDirection="inherit"> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" @@ -78,7 +78,7 @@ android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" - android:horizontalDirection="ltr"> + android:layoutDirection="ltr"> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" @@ -105,7 +105,7 @@ android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" - android:horizontalDirection="rtl"> + android:layoutDirection="rtl"> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" @@ -132,7 +132,7 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" - android:horizontalDirection="inherit"> + android:layoutDirection="inherit"> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" @@ -159,7 +159,7 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" - android:horizontalDirection="ltr"> + android:layoutDirection="ltr"> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" @@ -186,7 +186,7 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" - android:horizontalDirection="rtl"> + android:layoutDirection="rtl"> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" diff --git a/tests/BiDiTests/res/layout/linear_layout_rtl.xml b/tests/BiDiTests/res/layout/linear_layout_rtl.xml index 1494fec54ac9..9d0726386c3d 100644 --- a/tests/BiDiTests/res/layout/linear_layout_rtl.xml +++ b/tests/BiDiTests/res/layout/linear_layout_rtl.xml @@ -19,7 +19,7 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - android:horizontalDirection="rtl"> + android:layoutDirection="rtl"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" @@ -51,7 +51,7 @@ android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" - android:horizontalDirection="inherit"> + android:layoutDirection="inherit"> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" @@ -78,7 +78,7 @@ android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" - android:horizontalDirection="ltr"> + android:layoutDirection="ltr"> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" @@ -105,7 +105,7 @@ android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" - android:horizontalDirection="rtl"> + android:layoutDirection="rtl"> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" @@ -132,7 +132,7 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" - android:horizontalDirection="inherit"> + android:layoutDirection="inherit"> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" @@ -159,7 +159,7 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" - android:horizontalDirection="ltr"> + android:layoutDirection="ltr"> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" @@ -186,7 +186,7 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" - android:horizontalDirection="rtl"> + android:layoutDirection="rtl"> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" diff --git a/tests/BiDiTests/res/layout/relative_layout_ltr.xml b/tests/BiDiTests/res/layout/relative_layout_ltr.xml index 53ae7c34ba28..d789707dfe62 100644 --- a/tests/BiDiTests/res/layout/relative_layout_ltr.xml +++ b/tests/BiDiTests/res/layout/relative_layout_ltr.xml @@ -18,7 +18,7 @@ android:id="@+id/frame_layout_ltr" android:layout_width="match_parent" android:layout_height="match_parent" - android:horizontalDirection="ltr" + android:layoutDirection="ltr" android:background="#FF000000"> <RelativeLayout @@ -52,28 +52,28 @@ <RelativeLayout android:layout_width="100dp" android:layout_height="100dp" - android:layout_gravity="top|before" + android:layout_gravity="top|start" android:background="#FFFFFFFF"> </RelativeLayout> <RelativeLayout android:layout_width="100dp" android:layout_height="100dp" - android:layout_gravity="top|after" + android:layout_gravity="top|end" android:background="#FFFFFF00"> </RelativeLayout> <RelativeLayout android:layout_width="100dp" android:layout_height="100dp" - android:layout_gravity="bottom|before" + android:layout_gravity="bottom|start" android:background="#FFFFFFFF"> </RelativeLayout> <RelativeLayout android:layout_width="100dp" android:layout_height="100dp" - android:layout_gravity="bottom|after" + android:layout_gravity="bottom|end" android:background="#FFFFFF00"> </RelativeLayout> diff --git a/tests/BiDiTests/res/layout/relative_layout_ltr_2.xml b/tests/BiDiTests/res/layout/relative_layout_ltr_2.xml index 93d1b4ba1676..a13ef8bfc0ad 100644 --- a/tests/BiDiTests/res/layout/relative_layout_ltr_2.xml +++ b/tests/BiDiTests/res/layout/relative_layout_ltr_2.xml @@ -19,7 +19,7 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - android:horizontalDirection="ltr"> + android:layoutDirection="ltr"> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" @@ -58,7 +58,7 @@ android:layout_height="wrap_content" android:background="#FF000000" android:padding="10px" - android:horizontalDirection="ltr"> + android:layoutDirection="ltr"> <TextView android:id="@+id/label_2" android:layout_width="fill_parent" @@ -91,7 +91,7 @@ android:layout_height="wrap_content" android:background="#FF000000" android:padding="10px" - android:horizontalDirection="inherit"> + android:layoutDirection="inherit"> <TextView android:id="@+id/label_3" android:layout_width="fill_parent" @@ -124,7 +124,7 @@ android:layout_height="wrap_content" android:background="#FF000000" android:padding="10px" - android:horizontalDirection="rtl"> + android:layoutDirection="rtl"> <TextView android:id="@+id/label_4" android:layout_width="fill_parent" diff --git a/tests/BiDiTests/res/layout/relative_layout_rtl.xml b/tests/BiDiTests/res/layout/relative_layout_rtl.xml index 4b87752a92b1..580892474206 100644 --- a/tests/BiDiTests/res/layout/relative_layout_rtl.xml +++ b/tests/BiDiTests/res/layout/relative_layout_rtl.xml @@ -18,7 +18,7 @@ android:id="@+id/frame_layout_rtl" android:layout_width="match_parent" android:layout_height="match_parent" - android:horizontalDirection="rtl" + android:layoutDirection="rtl" android:background="#FF000000"> <RelativeLayout @@ -52,28 +52,28 @@ <RelativeLayout android:layout_width="100dp" android:layout_height="100dp" - android:layout_gravity="top|before" + android:layout_gravity="top|start" android:background="#FFFFFFFF"> </RelativeLayout> <RelativeLayout android:layout_width="100dp" android:layout_height="100dp" - android:layout_gravity="top|after" + android:layout_gravity="top|end" android:background="#FFFFFF00"> </RelativeLayout> <RelativeLayout android:layout_width="100dp" android:layout_height="100dp" - android:layout_gravity="bottom|before" + android:layout_gravity="bottom|start" android:background="#FFFFFFFF"> </RelativeLayout> <RelativeLayout android:layout_width="100dp" android:layout_height="100dp" - android:layout_gravity="bottom|after" + android:layout_gravity="bottom|end" android:background="#FFFFFF00"> </RelativeLayout> diff --git a/tests/BiDiTests/res/layout/relative_layout_rtl_2.xml b/tests/BiDiTests/res/layout/relative_layout_rtl_2.xml index 8418e72f58ab..1a6b3d54a04d 100644 --- a/tests/BiDiTests/res/layout/relative_layout_rtl_2.xml +++ b/tests/BiDiTests/res/layout/relative_layout_rtl_2.xml @@ -19,7 +19,7 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - android:horizontalDirection="rtl"> + android:layoutDirection="rtl"> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" @@ -58,7 +58,7 @@ android:layout_height="wrap_content" android:background="#FF000000" android:padding="10px" - android:horizontalDirection="ltr"> + android:layoutDirection="ltr"> <TextView android:id="@+id/label_2" android:layout_width="fill_parent" @@ -91,7 +91,7 @@ android:layout_height="wrap_content" android:background="#FF000000" android:padding="10px" - android:horizontalDirection="inherit"> + android:layoutDirection="inherit"> <TextView android:id="@+id/label_3" android:layout_width="fill_parent" @@ -124,7 +124,7 @@ android:layout_height="wrap_content" android:background="#FF000000" android:padding="10px" - android:horizontalDirection="rtl"> + android:layoutDirection="rtl"> <TextView android:id="@+id/label_4" android:layout_width="fill_parent" diff --git a/tests/BiDiTests/res/layout/table_layout_ltr.xml b/tests/BiDiTests/res/layout/table_layout_ltr.xml index f44de8ed9880..8e1891e7014c 100644 --- a/tests/BiDiTests/res/layout/table_layout_ltr.xml +++ b/tests/BiDiTests/res/layout/table_layout_ltr.xml @@ -19,7 +19,7 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - android:horizontalDirection="ltr"> + android:layoutDirection="ltr"> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" @@ -72,7 +72,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:stretchColumns="1,2" - android:horizontalDirection="inherit"> + android:layoutDirection="inherit"> <TableRow> <Button android:layout_height="wrap_content" @@ -120,7 +120,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:stretchColumns="1,2" - android:horizontalDirection="ltr"> + android:layoutDirection="ltr"> <TableRow> <Button android:layout_height="wrap_content" @@ -168,7 +168,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:stretchColumns="1,2" - android:horizontalDirection="rtl"> + android:layoutDirection="rtl"> <TableRow> <Button android:layout_height="wrap_content" diff --git a/tests/BiDiTests/res/layout/table_layout_rtl.xml b/tests/BiDiTests/res/layout/table_layout_rtl.xml index 84270baa8b97..bd664e4900db 100644 --- a/tests/BiDiTests/res/layout/table_layout_rtl.xml +++ b/tests/BiDiTests/res/layout/table_layout_rtl.xml @@ -19,7 +19,7 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - android:horizontalDirection="rtl"> + android:layoutDirection="rtl"> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" @@ -72,7 +72,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:stretchColumns="1,2" - android:horizontalDirection="inherit"> + android:layoutDirection="inherit"> <TableRow> <Button android:layout_height="wrap_content" @@ -120,7 +120,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:stretchColumns="1,2" - android:horizontalDirection="ltr"> + android:layoutDirection="ltr"> <TableRow> <Button android:layout_height="wrap_content" @@ -168,7 +168,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:stretchColumns="1,2" - android:horizontalDirection="rtl"> + android:layoutDirection="rtl"> <TableRow> <Button android:layout_height="wrap_content" |