gpt4 book ai didi

pointerInput on many elements not working correctly(在许多元素上的pointerInput不能正常工作)

转载 作者:bug小助手 更新时间:2023-10-25 11:48:23 24 4
gpt4 key购买 nike



I have created a custom button that makes animations when you start clicking and when you release the click. This works, but I have a LazyVerticalGrid with several buttons and this animation only works on some.

我已经创建了一个自定义按钮,当你开始点击和释放点击时,它会制作动画。这是可行的,但我有一个带有几个按钮的LazyVerticalGrid,这个动画只在一些按钮上起作用。


.pointerInput(isPressed) {
awaitPointerEventScope {
isPressed = if (isPressed) {
waitForUpOrCancellation()
false
} else {
awaitFirstDown(false)
haptic.performHapticFeedback(HapticFeedbackType.LongPress)
true
}
}
}

更多回答
优秀答案推荐
更多回答

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com