Thread
#compose
    james

    james

    1 year ago
    is there any way to have a
    DropdownMenu
    appear in the position of a click? I'd like to capture the x, y position of a click event and have the
    DropdownMenu
    anchored to that position, rather than it just anchoring itself in the default position
    Dominaezzz

    Dominaezzz

    1 year ago
    I think you want
    ContextMenu
    and not
    DropdownMenu
    .
    james

    james

    1 year ago
    thanks Dominic, but I'm after a Composable, not something from the
    android.view
    package. the solution I've built using Compose's
    DropdownMenu
    works great, I'd just like to change the UX slightly and change the placement of the menu
    Dominaezzz

    Dominaezzz

    1 year ago
    Ah, it's a composable function but it appears to be desktop only.
    Ravi

    Ravi

    1 year ago
    @james try
    onGloballyPositioned
    -> positionInParent you will get x,y position and anchor DropDownMenu to that.