Loading core/java/android/view/View.java +12 −9 Original line number Diff line number Diff line Loading @@ -5568,7 +5568,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @ViewDebug.IntToString(from = LAYOUT_DIRECTION_RTL, to = "RESOLVED_DIRECTION_RTL") }) public int getResolvedLayoutDirection() { // The layout diretion will be resolved only if needed // The layout direction will be resolved only if needed if ((mPrivateFlags2 & LAYOUT_DIRECTION_RESOLVED) != LAYOUT_DIRECTION_RESOLVED) { resolveLayoutDirection(); } Loading Loading @@ -11269,16 +11269,19 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // Set resolved depending on layout direction switch (getLayoutDirection()) { case LAYOUT_DIRECTION_INHERIT: // If this is root view, no need to look at parent's layout dir. if (canResolveLayoutDirection()) { // We cannot resolve yet. LTR is by default and let the resolution happen again // later to get the correct resolved value if (!canResolveLayoutDirection()) return; ViewGroup viewGroup = ((ViewGroup) mParent); // We cannot resolve yet on the parent too. LTR is by default and let the // resolution happen again later if (!viewGroup.canResolveLayoutDirection()) return; if (viewGroup.getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL) { mPrivateFlags2 |= LAYOUT_DIRECTION_RESOLVED_RTL; } } else { // Nothing to do, LTR by default } break; case LAYOUT_DIRECTION_RTL: mPrivateFlags2 |= LAYOUT_DIRECTION_RESOLVED_RTL; Loading Loading
core/java/android/view/View.java +12 −9 Original line number Diff line number Diff line Loading @@ -5568,7 +5568,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @ViewDebug.IntToString(from = LAYOUT_DIRECTION_RTL, to = "RESOLVED_DIRECTION_RTL") }) public int getResolvedLayoutDirection() { // The layout diretion will be resolved only if needed // The layout direction will be resolved only if needed if ((mPrivateFlags2 & LAYOUT_DIRECTION_RESOLVED) != LAYOUT_DIRECTION_RESOLVED) { resolveLayoutDirection(); } Loading Loading @@ -11269,16 +11269,19 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // Set resolved depending on layout direction switch (getLayoutDirection()) { case LAYOUT_DIRECTION_INHERIT: // If this is root view, no need to look at parent's layout dir. if (canResolveLayoutDirection()) { // We cannot resolve yet. LTR is by default and let the resolution happen again // later to get the correct resolved value if (!canResolveLayoutDirection()) return; ViewGroup viewGroup = ((ViewGroup) mParent); // We cannot resolve yet on the parent too. LTR is by default and let the // resolution happen again later if (!viewGroup.canResolveLayoutDirection()) return; if (viewGroup.getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL) { mPrivateFlags2 |= LAYOUT_DIRECTION_RESOLVED_RTL; } } else { // Nothing to do, LTR by default } break; case LAYOUT_DIRECTION_RTL: mPrivateFlags2 |= LAYOUT_DIRECTION_RESOLVED_RTL; Loading