Olivier Patry

03/22/2021, 10:28 PM
I have difficulties with
coordinate of the menu is correct but the vertical position is wrong always stick to the bottom of the window. It seems close to which is closed though. And the mechanic wasn't the same as of now it seems. You can see in the :thread-please: the details (code & screenshots)
As you can see, the horizontal position is fine, in second screenshot, it's triggered by the
in the white area, in the 3rd screenshot, by the
from the toolbar
When I debug the values of my anchors, they are perfectly correct, both for x & y coordinates.
What I noticed also is that the menu briefly appears at the right position (for a frame or 2) before landing at the bottom of the screen
here follows a screen capture
it seems I didn't properly understand the way
work. Using the sample code found here[…]in/java/androidx/compose/material/samples/MenuSamples.kt I understood I had to wrap both "anchor" and Dropdown within the same
parent with proper
where XXX is the anchor rules for this configuration. It now works as intended.
👍 1

Chris Sinco [G]

03/23/2021, 2:20 AM
Yep, it uses the Box parent as the anchor.