Thread
#compose
    Adib Faramarzi

    Adib Faramarzi

    1 year ago
    How would you go for finger "hover" detection? I have a grid of boxes and I want the user to hold their finger and drag onto the boxes, all the boxes that have been touched by the finger should be notified.
    The problem is if I handle the touch event inside one box, it would get eaten by that box and no one else will be notified.
    I was thinking of an API (modifier) that would allow me to determine if a composable contains a point in screen. Or Simple put, gives me it's bounding box (position and width and height).
    Albert Chang

    Albert Chang

    1 year ago
    Modifier.onGloballyPositioned()
    Adib Faramarzi

    Adib Faramarzi

    1 year ago
    I'm not sure if the second approach is best though, I'm aiming to create a modifier like
    onHover {}
    Albert Chang

    Albert Chang

    1 year ago
    You can try but I don’t think handling a single gesture in multiple places makes sense.
    Adib Faramarzi

    Adib Faramarzi

    1 year ago
    It's not handling, that's the point. It's about notification of it