Skip to content
Commit 4ebacd3a authored by hh83.kim's avatar hh83.kim Committed by Vishnu Nair
Browse files

Fix PopupWindow's wrong location

Sometimes, we have seen cases that Popupwindow is located in the wrong place.
So we suggest some modification of logics in tryFitVertical and tryFitHorizontal methods of PopupWindow.
In those methods, there exists a statement whether the positions of anchor (anchorTopInScreen and anchorLeftInScreen) are bigger than 0.
However, there are some cases that those values become positive even though corresponding popup windows are not visible to user (places out of window area),
especially on devices with displaycuout, or apps with multiwindow modes.
So we modify to the anchor's top and left position values should be compared with top and left value of displayFrame, respectively, not 0.

Test: CtsWidgetTestCases:test android.widget.cts.PopupWindowTest

Bug: b/135749682
parent 969e1e27
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment