Is `.hoverable` a desktop-only modifier? It doesn'...
# compose
a
Is
.hoverable
a desktop-only modifier? It doesn't seem to work (
isHoveredState
is always false even though a finger is pressing and hovering over the element)
s
If it's pressed it's not hovered if I am not mistaken. As far as I know, hovered as a state only makes sense when you use a pointing device like a mouse, since it means "the pointer is above this composable but not pressing it"
a
That is right.
I'm currently looking for an API to have some kind of hover-like behavior in when user is touching. Something like a touch that can be left unconsumed (and everyone can "watch" it)
a
I would assume hoverable on mobile behaves like the hover motionevent, which happen if you're using a Pen input device hovered over the screen (and also talkback sends a hovered event before press)
s
Yeah pens and mice do have hovered events. And you can have pens and mice on mobile. In that case I'd expect to get hovered events. When you do not get those events is when using touch, as there is no such thing as hovering in that case. As far as the OS is concerned, the touch "pointers" don't exist when the user is not pressing, and if they're pressing, it's not a hover.