https://kotlinlang.org logo
#compose
Title
# compose
u

ursus

10/16/2023, 1:42 PM
I want to add haptic feedback to certain Button clicks. I'm looking at
Copy code
val hapticFeedback = LocalHapticFeedback.current
hapticFeedback.performHapticFeedback(HapticFeedbackType.TextHandleMove)
but there only seems to be
TextHandleMove
and
LongPress
available? How come? Is it still coming? Since I can
LocalView.current.performHapticFeedback(..)
and pick all the constants, not just 2
s

Stylianos Gakis

10/16/2023, 1:59 PM
https://issuetracker.google.com/issues/171394805 This seems to imply that you are indeed supposed to just defer to the View according to the message “deprecating these APIs and recommending the
LocalView
approach in the deprecation message” at least.
u

ursus

10/16/2023, 2:00 PM
oh great, thanks!
s

Stylianos Gakis

10/16/2023, 2:02 PM
But worth a star there, since it seems like this ticket has grown stale. Either the compose API should support everything, or it should be deprecated and deleted completely to stop confusing people who may have not seen that ticket
2 Views