Atul Gupta
12/06/2023, 11:30 AMval haptic = LocalHapticFeedback.current
and then haptic.performHapticFeedback(HapticFeedbackType.LongPress)
in the Image onClick but haptic is not working. Does anyone faced this similar issue while using Haptic?Atul Gupta
12/06/2023, 11:32 AMImage(
modifier = Modifier.clickable(role = Role.Button) {
haptic.performHapticFeedback(HapticFeedbackType.LongPress)
// invoking some lambda
},
painter = painterResource(R.drawable.some_icon),
contentDescription = stringResource(R.string.content_desc)
)
Shahzad Ansari
12/06/2023, 1:01 PMZoltan Demant
12/06/2023, 1:59 PMAtul Gupta
12/06/2023, 2:18 PMThis should work fine. Might not be it but are you testing on an emulator?
I am trying in actual device..Atul Gupta
12/06/2023, 2:19 PMDND
i am checkingAtul Gupta
01/06/2024, 8:07 PM