Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 185097f5 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix bug 3210201 - Popup window wrong size/position when IME hidden"

parents a754fd50 aa0b92ce
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -865,6 +865,9 @@ public final class ViewRoot extends Handler implements ViewParent,
                childWidthMeasureSpec = getRootMeasureSpec(desiredWindowWidth, lp.width);
                childHeightMeasureSpec = getRootMeasureSpec(desiredWindowHeight, lp.height);
                host.measure(childWidthMeasureSpec, childHeightMeasureSpec);
                if (mWidth != host.getMeasuredWidth() || mHeight != host.getMeasuredHeight()) {
                    windowSizeMayChange = true;
                }
            }

            if (DBG) {
+4 −0
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@ public class MenuPopupHelper implements AdapterView.OnItemClickListener, View.On
        }

        mPopup.setContentWidth(Math.min(measureContentWidth(adapter), mPopupMaxWidth));
        mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NOT_NEEDED);
        mPopup.show();
        mPopup.getListView().setOnKeyListener(this);
    }
@@ -163,6 +164,9 @@ public class MenuPopupHelper implements AdapterView.OnItemClickListener, View.On
            final View anchor = mAnchorView != null ? mAnchorView.get() : null;
            if (anchor != null && !anchor.isShown()) {
                dismiss();
            } else {
                // Recompute window size and position
                mPopup.show();
            }
        }
    }