Loading core/java/com/android/internal/view/menu/CascadingMenuPopup.java +6 −2 Original line number Diff line number Diff line Loading @@ -80,11 +80,15 @@ final class CascadingMenuPopup extends MenuPopup implements MenuPresenter, OnKey private final OnGlobalLayoutListener mGlobalLayoutListener = new OnGlobalLayoutListener() { @Override public void onGlobalLayout() { if (isShowing()) { // Only move the popup if it's showing and non-modal. We don't want // to be moving around the only interactive window, since there's a // good chance the user is interacting with it. if (isShowing() && mShowingMenus.size() > 0 && !mShowingMenus.get(0).window.isModal()) { final View anchor = mShownAnchorView; if (anchor == null || !anchor.isShown()) { dismiss(); } else if (isShowing()) { } else { // Recompute window sizes and positions. for (CascadingMenuInfo info : mShowingMenus) { info.window.show(); Loading core/java/com/android/internal/view/menu/StandardMenuPopup.java +5 −2 Original line number Diff line number Diff line Loading @@ -59,11 +59,14 @@ final class StandardMenuPopup extends MenuPopup implements OnDismissListener, On private final OnGlobalLayoutListener mGlobalLayoutListener = new OnGlobalLayoutListener() { @Override public void onGlobalLayout() { if (isShowing()) { // Only move the popup if it's showing and non-modal. We don't want // to be moving around the only interactive window, since there's a // good chance the user is interacting with it. if (isShowing() && !mPopup.isModal()) { final View anchor = mShownAnchorView; if (anchor == null || !anchor.isShown()) { dismiss(); } else if (isShowing()) { } else { // Recompute window size and position mPopup.show(); } Loading Loading
core/java/com/android/internal/view/menu/CascadingMenuPopup.java +6 −2 Original line number Diff line number Diff line Loading @@ -80,11 +80,15 @@ final class CascadingMenuPopup extends MenuPopup implements MenuPresenter, OnKey private final OnGlobalLayoutListener mGlobalLayoutListener = new OnGlobalLayoutListener() { @Override public void onGlobalLayout() { if (isShowing()) { // Only move the popup if it's showing and non-modal. We don't want // to be moving around the only interactive window, since there's a // good chance the user is interacting with it. if (isShowing() && mShowingMenus.size() > 0 && !mShowingMenus.get(0).window.isModal()) { final View anchor = mShownAnchorView; if (anchor == null || !anchor.isShown()) { dismiss(); } else if (isShowing()) { } else { // Recompute window sizes and positions. for (CascadingMenuInfo info : mShowingMenus) { info.window.show(); Loading
core/java/com/android/internal/view/menu/StandardMenuPopup.java +5 −2 Original line number Diff line number Diff line Loading @@ -59,11 +59,14 @@ final class StandardMenuPopup extends MenuPopup implements OnDismissListener, On private final OnGlobalLayoutListener mGlobalLayoutListener = new OnGlobalLayoutListener() { @Override public void onGlobalLayout() { if (isShowing()) { // Only move the popup if it's showing and non-modal. We don't want // to be moving around the only interactive window, since there's a // good chance the user is interacting with it. if (isShowing() && !mPopup.isModal()) { final View anchor = mShownAnchorView; if (anchor == null || !anchor.isShown()) { dismiss(); } else if (isShowing()) { } else { // Recompute window size and position mPopup.show(); } Loading