Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -21271,6 +21271,7 @@ package android.view { method public boolean isInEditMode(); method public boolean isInTouchMode(); method public boolean isLayoutRequested(); method public boolean isLayoutRtl(); method public boolean isLongClickable(); method public boolean isOpaque(); method protected boolean isPaddingOffsetRequired(); core/java/android/view/View.java +32 −0 Original line number Diff line number Diff line Loading @@ -1709,6 +1709,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility */ static final int DRAG_HOVERED = 0x00000002; /** * Indicates whether the view is drawn in right-to-left direction. * * @hide */ static final int RESOLVED_LAYOUT_RTL = 0x00000004; /* End of masks for mPrivateFlags2 */ static final int DRAG_MASK = DRAG_CAN_ACCEPT | DRAG_HOVERED; Loading Loading @@ -8488,6 +8495,21 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility mPrivateFlags &= ~AWAKEN_SCROLL_BARS_ON_ATTACH; } jumpDrawablesToCurrentState(); // Resolving the layout direction. LTR is set initially. mPrivateFlags2 &= ~RESOLVED_LAYOUT_RTL; switch (getHorizontalDirection()) { case HORIZONTAL_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: mPrivateFlags2 |= RESOLVED_LAYOUT_RTL; break; } } /** Loading Loading @@ -9974,6 +9996,16 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility return (mPrivateFlags & FORCE_LAYOUT) == FORCE_LAYOUT; } /** * <p>Indicates whether or not this view's layout is right-to-left. This is resolved from * layout attribute and/or the inherited value from the parent.</p> * * @return true if the layout is right-to-left. */ public boolean isLayoutRtl() { return (mPrivateFlags2 & RESOLVED_LAYOUT_RTL) == RESOLVED_LAYOUT_RTL; } /** * Assign a size and position to a view and all of its * descendants Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -21271,6 +21271,7 @@ package android.view { method public boolean isInEditMode(); method public boolean isInTouchMode(); method public boolean isLayoutRequested(); method public boolean isLayoutRtl(); method public boolean isLongClickable(); method public boolean isOpaque(); method protected boolean isPaddingOffsetRequired();
core/java/android/view/View.java +32 −0 Original line number Diff line number Diff line Loading @@ -1709,6 +1709,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility */ static final int DRAG_HOVERED = 0x00000002; /** * Indicates whether the view is drawn in right-to-left direction. * * @hide */ static final int RESOLVED_LAYOUT_RTL = 0x00000004; /* End of masks for mPrivateFlags2 */ static final int DRAG_MASK = DRAG_CAN_ACCEPT | DRAG_HOVERED; Loading Loading @@ -8488,6 +8495,21 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility mPrivateFlags &= ~AWAKEN_SCROLL_BARS_ON_ATTACH; } jumpDrawablesToCurrentState(); // Resolving the layout direction. LTR is set initially. mPrivateFlags2 &= ~RESOLVED_LAYOUT_RTL; switch (getHorizontalDirection()) { case HORIZONTAL_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: mPrivateFlags2 |= RESOLVED_LAYOUT_RTL; break; } } /** Loading Loading @@ -9974,6 +9996,16 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility return (mPrivateFlags & FORCE_LAYOUT) == FORCE_LAYOUT; } /** * <p>Indicates whether or not this view's layout is right-to-left. This is resolved from * layout attribute and/or the inherited value from the parent.</p> * * @return true if the layout is right-to-left. */ public boolean isLayoutRtl() { return (mPrivateFlags2 & RESOLVED_LAYOUT_RTL) == RESOLVED_LAYOUT_RTL; } /** * Assign a size and position to a view and all of its * descendants Loading