PressInteraction gives me the press offset. ```cla...
# compose
k
PressInteraction gives me the press offset.
Copy code
class Press(val pressPosition: Offset) : PressInteraction
Is there any way to know how much pressure is being applied on a press interaction. Maybe should use some other api instead of PressInteraction ?
z
I think you’d need to handle the gesture yourself with
pointerInput
k
That sounds good. Any pointers on making sure it works well with talkback. I think clickable has some extra logic inside to handle this, would you be able to point out what it is and I will try to replicate that.
z
I can’t give you accessibility tips since I don’t know what you’re trying to build. If you’re just making a version of
clickable
that includes pressure indication, a11y services wouldn’t report that anyway so you should just publish the same semantics actions and properties that
clickable
does (eg
OnClick
at least).
👍 1
k
cool, thanks! I'm trying to build a pressure sensitive button that changes scale based on the amount of pressure applied. Will give it a go and share my sample here when I'm ready.