Skip to content
Commit b40e61b7 authored by Vladislav Kaznacheev's avatar Vladislav Kaznacheev
Browse files

Anchor a cascading submenu to its parent menu item

The current implementation of cascading menus is anchoring
a submenu to the top-level anchor view using a carefully
computed offset. This offset is only correct for the case when
the submenu is being shown normally, but not when it is
flipped due to insufficient space below.

More over, when the window containing the anchor is scrolled,
the pre-computed might become completely irrelevant, as
parent menus might change their above/below state.

This CL allows a PopupWindow to be anchored to a view in
another popup window (previously it was only possible to
anchor to a view in the main app window).

Cascading submenu is now tracking its parent item position
correctly.

Bug: 35768002
Test: android.cts.widget.PopupWindowTest.testAnchorInPopup
Change-Id: Id163d739de05729a9fa7e5fedebc9ec0037ed80e
parent 07084924
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