Loading api/current.txt +20 −7 Original line number Diff line number Diff line Loading @@ -593,6 +593,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 = 16843689; // 0x10103a9 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 Loading @@ -614,10 +615,10 @@ package android { field public static final int layout_height = 16842997; // 0x10100f5 field public static final int layout_margin = 16842998; // 0x10100f6 field public static final int layout_marginBottom = 16843002; // 0x10100fa field public static final int layout_marginEnd = 16843692; // 0x10103ac field public static final int layout_marginEnd = 16843693; // 0x10103ad field public static final int layout_marginLeft = 16842999; // 0x10100f7 field public static final int layout_marginRight = 16843001; // 0x10100f9 field public static final int layout_marginStart = 16843691; // 0x10103ab field public static final int layout_marginStart = 16843692; // 0x10103ac field public static final int layout_marginTop = 16843000; // 0x10100f8 field public static final int layout_row = 16843643; // 0x101037b field public static final int layout_rowSpan = 16843644; // 0x101037c Loading Loading @@ -713,10 +714,10 @@ package android { field public static final int packageNames = 16843649; // 0x1010381 field public static final int padding = 16842965; // 0x10100d5 field public static final int paddingBottom = 16842969; // 0x10100d9 field public static final int paddingEnd = 16843690; // 0x10103aa field public static final int paddingEnd = 16843691; // 0x10103ab field public static final int paddingLeft = 16842966; // 0x10100d6 field public static final int paddingRight = 16842968; // 0x10100d8 field public static final int paddingStart = 16843689; // 0x10103a9 field public static final int paddingStart = 16843690; // 0x10103aa field public static final int paddingTop = 16842967; // 0x10100d7 field public static final int panelBackground = 16842846; // 0x101005e field public static final int panelColorBackground = 16842849; // 0x1010061 Loading Loading @@ -7392,8 +7393,8 @@ package android.database.sqlite { ctor public SQLiteOpenHelper(android.content.Context, java.lang.String, android.database.sqlite.SQLiteDatabase.CursorFactory, int, android.database.DatabaseErrorHandler); method public synchronized void close(); method public java.lang.String getDatabaseName(); method public synchronized android.database.sqlite.SQLiteDatabase getReadableDatabase(); method public synchronized android.database.sqlite.SQLiteDatabase getWritableDatabase(); method public android.database.sqlite.SQLiteDatabase getReadableDatabase(); method public android.database.sqlite.SQLiteDatabase getWritableDatabase(); method public abstract void onCreate(android.database.sqlite.SQLiteDatabase); method public void onDowngrade(android.database.sqlite.SQLiteDatabase, int, int); method public void onOpen(android.database.sqlite.SQLiteDatabase); Loading Loading @@ -23105,6 +23106,7 @@ package android.view { method public void buildDrawingCache(boolean); method public void buildLayer(); method public boolean callOnClick(); method public boolean canResolveLayoutDirection(); method public boolean canScrollHorizontally(int); method public boolean canScrollVertically(int); method public void cancelLongPress(); Loading Loading @@ -23190,6 +23192,7 @@ package android.view { method public boolean getKeepScreenOn(); method public android.view.KeyEvent.DispatcherState getKeyDispatcherState(); method public int getLayerType(); method public int getLayoutDirection(); method public android.view.ViewGroup.LayoutParams getLayoutParams(); method public final int getLeft(); method protected float getLeftFadingEdgeStrength(); Loading Loading @@ -23219,6 +23222,8 @@ package android.view { method public final android.view.ViewParent getParent(); method public float getPivotX(); method public float getPivotY(); method public int getResolvedLayoutDirection(); method public int getResolvedLayoutDirection(android.graphics.drawable.Drawable); method public int getResolvedTextDirection(); method public android.content.res.Resources getResources(); method public final int getRight(); Loading Loading @@ -23286,7 +23291,9 @@ package android.view { method public boolean isHovered(); method public boolean isInEditMode(); method public boolean isInTouchMode(); method protected static boolean isLayoutDirectionRtl(java.util.Locale); method public boolean isLayoutRequested(); method public boolean isLayoutRtl(); method public boolean isLongClickable(); method public boolean isOpaque(); method protected boolean isPaddingOffsetRequired(); Loading Loading @@ -23375,6 +23382,7 @@ package android.view { method public void requestLayout(); method public boolean requestRectangleOnScreen(android.graphics.Rect); method public boolean requestRectangleOnScreen(android.graphics.Rect, boolean); method public void resetResolvedLayoutDirection(); method public void resetResolvedTextDirection(); method public void resolvePadding(); method public static int resolveSize(int, int); Loading Loading @@ -23415,6 +23423,7 @@ package android.view { method public void setId(int); method public void setKeepScreenOn(boolean); method public void setLayerType(int, android.graphics.Paint); method public void setLayoutDirection(int); method public void setLayoutParams(android.view.ViewGroup.LayoutParams); method public final void setLeft(int); method public void setLongClickable(boolean); Loading Loading @@ -23517,6 +23526,10 @@ package android.view { field public static final int LAYER_TYPE_HARDWARE = 2; // 0x2 field public static final int LAYER_TYPE_NONE = 0; // 0x0 field public static final int LAYER_TYPE_SOFTWARE = 1; // 0x1 field public static final int LAYOUT_DIRECTION_INHERIT = -2147483648; // 0x80000000 field public static final int LAYOUT_DIRECTION_LOCALE = -1073741824; // 0xc0000000 field public static final int LAYOUT_DIRECTION_LTR = 0; // 0x0 field public static final int LAYOUT_DIRECTION_RTL = 1073741824; // 0x40000000 field public static final int MEASURED_HEIGHT_STATE_SHIFT = 16; // 0x10 field public static final int MEASURED_SIZE_MASK = 16777215; // 0xffffff field public static final int MEASURED_STATE_MASK = -16777216; // 0xff000000 Loading Loading @@ -23831,7 +23844,6 @@ package android.view { method public void requestDisallowInterceptTouchEvent(boolean); method public boolean requestSendAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent); method public void requestTransparentRegion(android.view.View); method protected void resetResolvedLayoutDirection(); method public void scheduleLayoutAnimation(); method public void setAddStatesFromChildren(boolean); method public void setAlwaysDrawnWithCacheEnabled(boolean); Loading Loading @@ -23869,6 +23881,7 @@ package android.view { ctor public ViewGroup.LayoutParams(android.content.Context, android.util.AttributeSet); ctor public ViewGroup.LayoutParams(int, int); ctor public ViewGroup.LayoutParams(android.view.ViewGroup.LayoutParams); method public void onResolveLayoutDirection(int); method protected void setBaseAttributes(android.content.res.TypedArray, int, int); field public static final deprecated int FILL_PARENT = -1; // 0xffffffff field public static final int MATCH_PARENT = -1; // 0xffffffff core/java/android/view/View.java +8 −26 Original line number Diff line number Diff line Loading @@ -956,28 +956,24 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal /** * Horizontal direction of this view is from Left to Right. * Use with {@link #setLayoutDirection}. * {@hide} */ public static final int LAYOUT_DIRECTION_LTR = 0x00000000; /** * Horizontal direction of this view is from Right to Left. * Use with {@link #setLayoutDirection}. * {@hide} */ public static final int LAYOUT_DIRECTION_RTL = 0x40000000; /** * Horizontal direction of this view is inherited from its parent. * Use with {@link #setLayoutDirection}. * {@hide} */ 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 #setLayoutDirection}. * {@hide} */ public static final int LAYOUT_DIRECTION_LOCALE = 0xC0000000; Loading Loading @@ -4833,8 +4829,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * {@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 = LAYOUT_DIRECTION_LTR, to = "LTR"), Loading @@ -4856,8 +4850,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * {@link #LAYOUT_DIRECTION_LOCALE}. * * @attr ref android.R.styleable#View_layoutDirection * * @hide */ @RemotableViewMethod public void setLayoutDirection(int layoutDirection) { Loading @@ -4873,8 +4865,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * * @return {@link #LAYOUT_DIRECTION_RTL} if the layout direction is RTL or returns * {@link #LAYOUT_DIRECTION_LTR} id the layout direction is not RTL. * * @hide */ @ViewDebug.ExportedProperty(category = "layout", mapping = { @ViewDebug.IntToString(from = LAYOUT_DIRECTION_LTR, to = "RESOLVED_DIRECTION_LTR"), Loading @@ -4891,8 +4881,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * layout attribute and/or the inherited value from the parent.</p> * * @return true if the layout is right-to-left. * * @hide */ @ViewDebug.ExportedProperty(category = "layout") public boolean isLayoutRtl() { Loading Loading @@ -9672,11 +9660,11 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } /** * Return true if layout direction resolution can be done * Check if layout direction resolution can be done. * * @hide * @return true if layout direction resolution can be done otherwise return false. */ protected boolean canResolveLayoutDirection() { public boolean canResolveLayoutDirection() { switch (getLayoutDirection()) { case LAYOUT_DIRECTION_INHERIT: return (mParent != null); Loading @@ -9691,23 +9679,19 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * Subclasses need to override this method to clear cached information that depends on the * resolved layout direction, or to inform child views that inherit their layout direction. * Overrides must also call the superclass implementation at the start of their implementation. * * @hide */ protected void resetResolvedLayoutDirection() { // Reset the layout direction resolution public void resetResolvedLayoutDirection() { // Reset the current View resolution mPrivateFlags2 &= ~LAYOUT_DIRECTION_RESOLVED; // Reset also the text direction resetResolvedTextDirection(); } /** * Check if a Locale is corresponding to a RTL script. * Check if a Locale uses an RTL script. * * @param locale Locale to check * @return true if a Locale is corresponding to a RTL script. * * @hide * @return true if the Locale uses an RTL script. */ protected static boolean isLayoutDirectionRtl(Locale locale) { return (LAYOUT_DIRECTION_RTL == LocaleUtil.getLayoutDirectionFromLocale(locale)); Loading Loading @@ -11865,8 +11849,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * Return the layout direction of a given Drawable. * * @param who the Drawable to query * * @hide */ public int getResolvedLayoutDirection(Drawable who) { return (who == mBGDrawable) ? getResolvedLayoutDirection() : LAYOUT_DIRECTION_DEFAULT; Loading Loading @@ -13059,7 +13041,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal if (mParent != null) { if (mLayoutParams != null) { mLayoutParams.resolveWithDirection(getResolvedLayoutDirection()); mLayoutParams.onResolveLayoutDirection(getResolvedLayoutDirection()); } if (!mParent.isLayoutRequested()) { mParent.requestLayout(); Loading core/java/android/view/ViewGroup.java +4 −8 Original line number Diff line number Diff line Loading @@ -4920,7 +4920,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } @Override protected void resetResolvedLayoutDirection() { public void resetResolvedLayoutDirection() { super.resetResolvedLayoutDirection(); // Take care of resetting the children resolution too Loading Loading @@ -5123,10 +5123,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * * {@link View#LAYOUT_DIRECTION_LTR} * {@link View#LAYOUT_DIRECTION_RTL} * * @hide */ protected void resolveWithDirection(int layoutDirection) { public void onResolveLayoutDirection(int layoutDirection) { } /** Loading Loading @@ -5377,12 +5375,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager /** * This will be called by {@link android.view.View#requestLayout()}. Left and Right margins * maybe overriden depending on layout direction. * * @hide * may be overridden depending on layout direction. */ @Override protected void resolveWithDirection(int layoutDirection) { public void onResolveLayoutDirection(int layoutDirection) { switch(layoutDirection) { case View.LAYOUT_DIRECTION_RTL: leftMargin = (endMargin > DEFAULT_RELATIVE) ? endMargin : leftMargin; Loading core/res/res/values/public.xml +2 −0 Original line number Diff line number Diff line Loading @@ -3525,6 +3525,8 @@ <public type="attr" name="textDirection"/> <public type="attr" name="layoutDirection" /> <public type="attr" name="paddingStart"/> <public type="attr" name="paddingEnd"/> Loading Loading
api/current.txt +20 −7 Original line number Diff line number Diff line Loading @@ -593,6 +593,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 = 16843689; // 0x10103a9 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 Loading @@ -614,10 +615,10 @@ package android { field public static final int layout_height = 16842997; // 0x10100f5 field public static final int layout_margin = 16842998; // 0x10100f6 field public static final int layout_marginBottom = 16843002; // 0x10100fa field public static final int layout_marginEnd = 16843692; // 0x10103ac field public static final int layout_marginEnd = 16843693; // 0x10103ad field public static final int layout_marginLeft = 16842999; // 0x10100f7 field public static final int layout_marginRight = 16843001; // 0x10100f9 field public static final int layout_marginStart = 16843691; // 0x10103ab field public static final int layout_marginStart = 16843692; // 0x10103ac field public static final int layout_marginTop = 16843000; // 0x10100f8 field public static final int layout_row = 16843643; // 0x101037b field public static final int layout_rowSpan = 16843644; // 0x101037c Loading Loading @@ -713,10 +714,10 @@ package android { field public static final int packageNames = 16843649; // 0x1010381 field public static final int padding = 16842965; // 0x10100d5 field public static final int paddingBottom = 16842969; // 0x10100d9 field public static final int paddingEnd = 16843690; // 0x10103aa field public static final int paddingEnd = 16843691; // 0x10103ab field public static final int paddingLeft = 16842966; // 0x10100d6 field public static final int paddingRight = 16842968; // 0x10100d8 field public static final int paddingStart = 16843689; // 0x10103a9 field public static final int paddingStart = 16843690; // 0x10103aa field public static final int paddingTop = 16842967; // 0x10100d7 field public static final int panelBackground = 16842846; // 0x101005e field public static final int panelColorBackground = 16842849; // 0x1010061 Loading Loading @@ -7392,8 +7393,8 @@ package android.database.sqlite { ctor public SQLiteOpenHelper(android.content.Context, java.lang.String, android.database.sqlite.SQLiteDatabase.CursorFactory, int, android.database.DatabaseErrorHandler); method public synchronized void close(); method public java.lang.String getDatabaseName(); method public synchronized android.database.sqlite.SQLiteDatabase getReadableDatabase(); method public synchronized android.database.sqlite.SQLiteDatabase getWritableDatabase(); method public android.database.sqlite.SQLiteDatabase getReadableDatabase(); method public android.database.sqlite.SQLiteDatabase getWritableDatabase(); method public abstract void onCreate(android.database.sqlite.SQLiteDatabase); method public void onDowngrade(android.database.sqlite.SQLiteDatabase, int, int); method public void onOpen(android.database.sqlite.SQLiteDatabase); Loading Loading @@ -23105,6 +23106,7 @@ package android.view { method public void buildDrawingCache(boolean); method public void buildLayer(); method public boolean callOnClick(); method public boolean canResolveLayoutDirection(); method public boolean canScrollHorizontally(int); method public boolean canScrollVertically(int); method public void cancelLongPress(); Loading Loading @@ -23190,6 +23192,7 @@ package android.view { method public boolean getKeepScreenOn(); method public android.view.KeyEvent.DispatcherState getKeyDispatcherState(); method public int getLayerType(); method public int getLayoutDirection(); method public android.view.ViewGroup.LayoutParams getLayoutParams(); method public final int getLeft(); method protected float getLeftFadingEdgeStrength(); Loading Loading @@ -23219,6 +23222,8 @@ package android.view { method public final android.view.ViewParent getParent(); method public float getPivotX(); method public float getPivotY(); method public int getResolvedLayoutDirection(); method public int getResolvedLayoutDirection(android.graphics.drawable.Drawable); method public int getResolvedTextDirection(); method public android.content.res.Resources getResources(); method public final int getRight(); Loading Loading @@ -23286,7 +23291,9 @@ package android.view { method public boolean isHovered(); method public boolean isInEditMode(); method public boolean isInTouchMode(); method protected static boolean isLayoutDirectionRtl(java.util.Locale); method public boolean isLayoutRequested(); method public boolean isLayoutRtl(); method public boolean isLongClickable(); method public boolean isOpaque(); method protected boolean isPaddingOffsetRequired(); Loading Loading @@ -23375,6 +23382,7 @@ package android.view { method public void requestLayout(); method public boolean requestRectangleOnScreen(android.graphics.Rect); method public boolean requestRectangleOnScreen(android.graphics.Rect, boolean); method public void resetResolvedLayoutDirection(); method public void resetResolvedTextDirection(); method public void resolvePadding(); method public static int resolveSize(int, int); Loading Loading @@ -23415,6 +23423,7 @@ package android.view { method public void setId(int); method public void setKeepScreenOn(boolean); method public void setLayerType(int, android.graphics.Paint); method public void setLayoutDirection(int); method public void setLayoutParams(android.view.ViewGroup.LayoutParams); method public final void setLeft(int); method public void setLongClickable(boolean); Loading Loading @@ -23517,6 +23526,10 @@ package android.view { field public static final int LAYER_TYPE_HARDWARE = 2; // 0x2 field public static final int LAYER_TYPE_NONE = 0; // 0x0 field public static final int LAYER_TYPE_SOFTWARE = 1; // 0x1 field public static final int LAYOUT_DIRECTION_INHERIT = -2147483648; // 0x80000000 field public static final int LAYOUT_DIRECTION_LOCALE = -1073741824; // 0xc0000000 field public static final int LAYOUT_DIRECTION_LTR = 0; // 0x0 field public static final int LAYOUT_DIRECTION_RTL = 1073741824; // 0x40000000 field public static final int MEASURED_HEIGHT_STATE_SHIFT = 16; // 0x10 field public static final int MEASURED_SIZE_MASK = 16777215; // 0xffffff field public static final int MEASURED_STATE_MASK = -16777216; // 0xff000000 Loading Loading @@ -23831,7 +23844,6 @@ package android.view { method public void requestDisallowInterceptTouchEvent(boolean); method public boolean requestSendAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent); method public void requestTransparentRegion(android.view.View); method protected void resetResolvedLayoutDirection(); method public void scheduleLayoutAnimation(); method public void setAddStatesFromChildren(boolean); method public void setAlwaysDrawnWithCacheEnabled(boolean); Loading Loading @@ -23869,6 +23881,7 @@ package android.view { ctor public ViewGroup.LayoutParams(android.content.Context, android.util.AttributeSet); ctor public ViewGroup.LayoutParams(int, int); ctor public ViewGroup.LayoutParams(android.view.ViewGroup.LayoutParams); method public void onResolveLayoutDirection(int); method protected void setBaseAttributes(android.content.res.TypedArray, int, int); field public static final deprecated int FILL_PARENT = -1; // 0xffffffff field public static final int MATCH_PARENT = -1; // 0xffffffff
core/java/android/view/View.java +8 −26 Original line number Diff line number Diff line Loading @@ -956,28 +956,24 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal /** * Horizontal direction of this view is from Left to Right. * Use with {@link #setLayoutDirection}. * {@hide} */ public static final int LAYOUT_DIRECTION_LTR = 0x00000000; /** * Horizontal direction of this view is from Right to Left. * Use with {@link #setLayoutDirection}. * {@hide} */ public static final int LAYOUT_DIRECTION_RTL = 0x40000000; /** * Horizontal direction of this view is inherited from its parent. * Use with {@link #setLayoutDirection}. * {@hide} */ 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 #setLayoutDirection}. * {@hide} */ public static final int LAYOUT_DIRECTION_LOCALE = 0xC0000000; Loading Loading @@ -4833,8 +4829,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * {@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 = LAYOUT_DIRECTION_LTR, to = "LTR"), Loading @@ -4856,8 +4850,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * {@link #LAYOUT_DIRECTION_LOCALE}. * * @attr ref android.R.styleable#View_layoutDirection * * @hide */ @RemotableViewMethod public void setLayoutDirection(int layoutDirection) { Loading @@ -4873,8 +4865,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * * @return {@link #LAYOUT_DIRECTION_RTL} if the layout direction is RTL or returns * {@link #LAYOUT_DIRECTION_LTR} id the layout direction is not RTL. * * @hide */ @ViewDebug.ExportedProperty(category = "layout", mapping = { @ViewDebug.IntToString(from = LAYOUT_DIRECTION_LTR, to = "RESOLVED_DIRECTION_LTR"), Loading @@ -4891,8 +4881,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * layout attribute and/or the inherited value from the parent.</p> * * @return true if the layout is right-to-left. * * @hide */ @ViewDebug.ExportedProperty(category = "layout") public boolean isLayoutRtl() { Loading Loading @@ -9672,11 +9660,11 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } /** * Return true if layout direction resolution can be done * Check if layout direction resolution can be done. * * @hide * @return true if layout direction resolution can be done otherwise return false. */ protected boolean canResolveLayoutDirection() { public boolean canResolveLayoutDirection() { switch (getLayoutDirection()) { case LAYOUT_DIRECTION_INHERIT: return (mParent != null); Loading @@ -9691,23 +9679,19 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * Subclasses need to override this method to clear cached information that depends on the * resolved layout direction, or to inform child views that inherit their layout direction. * Overrides must also call the superclass implementation at the start of their implementation. * * @hide */ protected void resetResolvedLayoutDirection() { // Reset the layout direction resolution public void resetResolvedLayoutDirection() { // Reset the current View resolution mPrivateFlags2 &= ~LAYOUT_DIRECTION_RESOLVED; // Reset also the text direction resetResolvedTextDirection(); } /** * Check if a Locale is corresponding to a RTL script. * Check if a Locale uses an RTL script. * * @param locale Locale to check * @return true if a Locale is corresponding to a RTL script. * * @hide * @return true if the Locale uses an RTL script. */ protected static boolean isLayoutDirectionRtl(Locale locale) { return (LAYOUT_DIRECTION_RTL == LocaleUtil.getLayoutDirectionFromLocale(locale)); Loading Loading @@ -11865,8 +11849,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * Return the layout direction of a given Drawable. * * @param who the Drawable to query * * @hide */ public int getResolvedLayoutDirection(Drawable who) { return (who == mBGDrawable) ? getResolvedLayoutDirection() : LAYOUT_DIRECTION_DEFAULT; Loading Loading @@ -13059,7 +13041,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal if (mParent != null) { if (mLayoutParams != null) { mLayoutParams.resolveWithDirection(getResolvedLayoutDirection()); mLayoutParams.onResolveLayoutDirection(getResolvedLayoutDirection()); } if (!mParent.isLayoutRequested()) { mParent.requestLayout(); Loading
core/java/android/view/ViewGroup.java +4 −8 Original line number Diff line number Diff line Loading @@ -4920,7 +4920,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } @Override protected void resetResolvedLayoutDirection() { public void resetResolvedLayoutDirection() { super.resetResolvedLayoutDirection(); // Take care of resetting the children resolution too Loading Loading @@ -5123,10 +5123,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * * {@link View#LAYOUT_DIRECTION_LTR} * {@link View#LAYOUT_DIRECTION_RTL} * * @hide */ protected void resolveWithDirection(int layoutDirection) { public void onResolveLayoutDirection(int layoutDirection) { } /** Loading Loading @@ -5377,12 +5375,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager /** * This will be called by {@link android.view.View#requestLayout()}. Left and Right margins * maybe overriden depending on layout direction. * * @hide * may be overridden depending on layout direction. */ @Override protected void resolveWithDirection(int layoutDirection) { public void onResolveLayoutDirection(int layoutDirection) { switch(layoutDirection) { case View.LAYOUT_DIRECTION_RTL: leftMargin = (endMargin > DEFAULT_RELATIVE) ? endMargin : leftMargin; Loading
core/res/res/values/public.xml +2 −0 Original line number Diff line number Diff line Loading @@ -3525,6 +3525,8 @@ <public type="attr" name="textDirection"/> <public type="attr" name="layoutDirection" /> <public type="attr" name="paddingStart"/> <public type="attr" name="paddingEnd"/> Loading