Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -22050,6 +22050,7 @@ package android.view { method public void buildDrawingCache(); method public void buildDrawingCache(boolean); method public void buildLayer(); method protected boolean canResolveLayoutDirection(); method public boolean canScrollHorizontally(int); method public boolean canScrollVertically(int); method public void cancelLongPress(); core/java/android/view/View.java +22 −4 Original line number Diff line number Diff line Loading @@ -9066,12 +9066,21 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit // Set resolved depending on layout direction switch (getLayoutDirection()) { case LAYOUT_DIRECTION_INHERIT: // We cannot do the resolution if there is no parent if (mParent == null) return; // If this is root view, no need to look at parent's layout dir. if (mParent != null && mParent instanceof ViewGroup && ((ViewGroup) mParent).getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL) { if (mParent instanceof ViewGroup) { ViewGroup viewGroup = ((ViewGroup) mParent); // Check if the parent view group can resolve if (! viewGroup.canResolveLayoutDirection()) { return; } if (viewGroup.getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL) { mPrivateFlags2 |= LAYOUT_DIRECTION_RESOLVED_RTL; } } break; case LAYOUT_DIRECTION_RTL: mPrivateFlags2 |= LAYOUT_DIRECTION_RESOLVED_RTL; Loading Loading @@ -9132,6 +9141,15 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit recomputePadding(); } protected boolean canResolveLayoutDirection() { switch (getLayoutDirection()) { case LAYOUT_DIRECTION_INHERIT: return (mParent != null); default: return true; } } /** * Reset the resolved layout direction. * Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -22050,6 +22050,7 @@ package android.view { method public void buildDrawingCache(); method public void buildDrawingCache(boolean); method public void buildLayer(); method protected boolean canResolveLayoutDirection(); method public boolean canScrollHorizontally(int); method public boolean canScrollVertically(int); method public void cancelLongPress();
core/java/android/view/View.java +22 −4 Original line number Diff line number Diff line Loading @@ -9066,12 +9066,21 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit // Set resolved depending on layout direction switch (getLayoutDirection()) { case LAYOUT_DIRECTION_INHERIT: // We cannot do the resolution if there is no parent if (mParent == null) return; // If this is root view, no need to look at parent's layout dir. if (mParent != null && mParent instanceof ViewGroup && ((ViewGroup) mParent).getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL) { if (mParent instanceof ViewGroup) { ViewGroup viewGroup = ((ViewGroup) mParent); // Check if the parent view group can resolve if (! viewGroup.canResolveLayoutDirection()) { return; } if (viewGroup.getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL) { mPrivateFlags2 |= LAYOUT_DIRECTION_RESOLVED_RTL; } } break; case LAYOUT_DIRECTION_RTL: mPrivateFlags2 |= LAYOUT_DIRECTION_RESOLVED_RTL; Loading Loading @@ -9132,6 +9141,15 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit recomputePadding(); } protected boolean canResolveLayoutDirection() { switch (getLayoutDirection()) { case LAYOUT_DIRECTION_INHERIT: return (mParent != null); default: return true; } } /** * Reset the resolved layout direction. * Loading