Loading core/java/android/widget/PopupWindow.java +19 −0 Original line number Diff line number Diff line Loading @@ -1067,6 +1067,17 @@ public class PopupWindow { } } private boolean isNeedSetLayoutDirectionFromAnchor() { if (mPopupViewInitialLayoutDirectionInherited && mPopupView != null && mAnchor != null) { View anchor = mAnchor.get(); if (anchor != null && (mPopupView.getLayoutDirection() != anchor.getLayoutDirection())) { return true; } } return false; } /** * <p>Generate the layout parameters for the popup window.</p> * Loading Loading @@ -1405,6 +1416,10 @@ public class PopupWindow { update = true; } if (isNeedSetLayoutDirectionFromAnchor()) { update = true; } if (update) { setLayoutDirectionFromAnchor(); mWindowManager.updateViewLayout(mPopupView, p); Loading Loading @@ -1506,6 +1521,10 @@ public class PopupWindow { update = true; } if (isNeedSetLayoutDirectionFromAnchor()) { update = true; } if (update) { setLayoutDirectionFromAnchor(); mWindowManager.updateViewLayout(mPopupView, p); Loading Loading
core/java/android/widget/PopupWindow.java +19 −0 Original line number Diff line number Diff line Loading @@ -1067,6 +1067,17 @@ public class PopupWindow { } } private boolean isNeedSetLayoutDirectionFromAnchor() { if (mPopupViewInitialLayoutDirectionInherited && mPopupView != null && mAnchor != null) { View anchor = mAnchor.get(); if (anchor != null && (mPopupView.getLayoutDirection() != anchor.getLayoutDirection())) { return true; } } return false; } /** * <p>Generate the layout parameters for the popup window.</p> * Loading Loading @@ -1405,6 +1416,10 @@ public class PopupWindow { update = true; } if (isNeedSetLayoutDirectionFromAnchor()) { update = true; } if (update) { setLayoutDirectionFromAnchor(); mWindowManager.updateViewLayout(mPopupView, p); Loading Loading @@ -1506,6 +1521,10 @@ public class PopupWindow { update = true; } if (isNeedSetLayoutDirectionFromAnchor()) { update = true; } if (update) { setLayoutDirectionFromAnchor(); mWindowManager.updateViewLayout(mPopupView, p); Loading